Fix using php 5.4 array [ ]

This commit is contained in:
vanquang9387 2015-10-19 15:52:10 +07:00
parent 8b3bba3341
commit 13132cd113

View file

@ -1031,7 +1031,7 @@ class Validation {
$check = $check['error'];
}
if ($allowNoFile) {
return in_array((int)$check, [UPLOAD_ERR_OK, UPLOAD_ERR_NO_FILE], true);
return in_array((int)$check, array(UPLOAD_ERR_OK, UPLOAD_ERR_NO_FILE), true);
}
return (int)$check === UPLOAD_ERR_OK;