Skip to content
Snippets Groups Projects
Commit b15f98c9 authored by Mathieu's avatar Mathieu
Browse files

FIX #18461 TIME 00:05 add check on 0 according to PHP empty function

parent 50a9377e
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ class ValidatorModel ...@@ -24,7 +24,7 @@ class ValidatorModel
throw new \Exception('First argument must be a non empty array'); 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]) == '0') { if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '0' && $args[$key] != '0') {
$args[$key] .= 'NOT_EMPTY'; $args[$key] .= 'NOT_EMPTY';
} }
if (!Validator::notEmpty()->validate($args[$key])) { if (!Validator::notEmpty()->validate($args[$key])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment