Skip to content

Commit

Permalink
Simplify _fieldIsEmpty() conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
johanmeiring committed Jan 30, 2017
1 parent 17e96e1 commit 7cc6d5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validation/Validator.php
Expand Up @@ -1715,7 +1715,7 @@ protected function _canBeEmpty($field, $context)
*/
protected function _fieldIsEmpty($data)
{
if (empty($data) && $data !== '0' && $data !== false && $data !== 0 && $data !== 0.0) {
if (empty($data) && !is_bool($data) && !is_numeric($data)) {
return true;
}
$isArray = is_array($data);
Expand Down

0 comments on commit 7cc6d5a

Please sign in to comment.