From 50a9377e11fb2e7fcd50364c04e7b208e9b75cd0 Mon Sep 17 00:00:00 2001 From: Mathieu <mpmathieu.pnr@gmail.com> Date: Wed, 10 Nov 2021 12:09:06 +0100 Subject: [PATCH] FIX #18461 TIME 3:00 fix postal address number error if 0 --- src/core/models/ValidatorModel.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/models/ValidatorModel.php b/src/core/models/ValidatorModel.php index 57c16ffbb30..98abaf53148 100755 --- a/src/core/models/ValidatorModel.php +++ b/src/core/models/ValidatorModel.php @@ -24,6 +24,9 @@ class ValidatorModel throw new \Exception('First argument must be a non empty array'); } foreach ($keys as $key) { + if (Validator::stringType()->validate($args[$key]) && trim($args[$key]) == '0') { + $args[$key] .= 'NOT_EMPTY'; + } if (!Validator::notEmpty()->validate($args[$key])) { throw new \Exception("Argument {$key} is empty"); } -- GitLab