diff --git a/framework/validators/FileValidator.php b/framework/validators/FileValidator.php index 6b0e139559..bf56538916 100644 --- a/framework/validators/FileValidator.php +++ b/framework/validators/FileValidator.php @@ -229,9 +229,9 @@ class FileValidator extends Validator */ public function isEmpty($value, $trim = false) { - $value = is_array($value) && !empty($value) ? $value[0] : $value; + $value = is_array($value) && !empty($value) ? $value[0] : $value; - return !$value instanceof UploadedFile || $value->error == UPLOAD_ERR_NO_FILE; + return !$value instanceof UploadedFile || $value->error == UPLOAD_ERR_NO_FILE; } /**