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

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

parent 9b130187
No related branches found
No related tags found
No related merge requests found
2103 0 → 120000
.
\ No newline at end of file
......@@ -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");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment