diff --git a/2103 b/2103 new file mode 120000 index 0000000000000000000000000000000000000000..945c9b46d684f08ec84cb316e1dc0061e361f794 --- /dev/null +++ b/2103 @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/src/core/models/ValidatorModel.php b/src/core/models/ValidatorModel.php index 8f93c8a232229bd388f12a759b38eaa396378023..6b49b811bca2c1fbd846651aa607b557d971b6cb 100755 --- a/src/core/models/ValidatorModel.php +++ b/src/core/models/ValidatorModel.php @@ -23,10 +23,13 @@ class ValidatorModel if (!Validator::arrayType()->notEmpty()->validate($args)) { throw new \Exception('First argument must be a non empty array'); } - foreach ($keys as $key) { + foreach ($keys as $key) { if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '' && $args[$key] != '') { $args[$key] .= 'NOT_EMPTY'; } + if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '0' && $args[$key] != '0') { + $args[$key] .= 'NOT_EMPTY'; + } if (!Validator::notEmpty()->validate($args[$key])) { throw new \Exception("Argument {$key} is empty"); }