Fixed getError in InputFile returning string instead of int.

This commit is contained in:
Simon Sessingø
2018-03-30 05:37:04 +02:00
parent ce63e247b1
commit 833961ddc3
2 changed files with 23 additions and 27 deletions
+4 -4
View File
@@ -49,7 +49,7 @@ class InputFile implements IInputItem
return (new static($values['index']))
->setSize((int)$values['size'])
->setError($values['error'])
->setError((int)$values['error'])
->setType($values['type'])
->setTmpName($values['tmp_name'])
->setFilename($values['name']);
@@ -216,11 +216,11 @@ class InputFile implements IInputItem
/**
* Get upload-error code.
*
* @return string
* @return int
*/
public function getError(): string
public function getError(): int
{
return $this->errors;
return (int)$this->errors;
}
/**