UploadedFile::validateActive()

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Source

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');
    }
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.