Skip to content

Commit

Permalink
Fix using php 5.4 array [ ]
Browse files Browse the repository at this point in the history
  • Loading branch information
vanquang9387 committed Oct 19, 2015
1 parent 8b3bba3 commit 13132cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Validation.php
Expand Up @@ -1031,7 +1031,7 @@ public static function uploadError($check, $allowNoFile = false) {
$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;
Expand Down

0 comments on commit 13132cd

Please sign in to comment.