You are here

private function UploadedFile::setError in Lockr 7.3

Parameters

int $error:

Throws

InvalidArgumentException

1 call to UploadedFile::setError()
UploadedFile::__construct in vendor/guzzlehttp/psr7/src/UploadedFile.php

File

vendor/guzzlehttp/psr7/src/UploadedFile.php, line 109

Class

UploadedFile

Namespace

GuzzleHttp\Psr7

Code

private function setError($error) {
  if (false === is_int($error)) {
    throw new InvalidArgumentException('Upload file error status must be an integer');
  }
  if (false === in_array($error, UploadedFile::$errors)) {
    throw new InvalidArgumentException('Invalid error status for UploadedFile');
  }
  $this->error = $error;
}