WordPress\AiClientDependencies\Nyholm\Psr7

UploadedFile::validateActiveprivateWP 1.0

Method of the class: UploadedFile{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->validateActive(): void;

UploadedFile::validateActive() code WP 7.0

private function validateActive(): void
{
    if (\UPLOAD_ERR_OK !== $this->error) {
        throw new \RuntimeException('Cannot retrieve stream due to upload error');
    }
    if ($this->moved) {
        throw new \RuntimeException('Cannot retrieve stream after it has already been moved');
    }
}