]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
Fix warning master
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 11 Sep 2022 13:20:16 +0000 (15:20 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 11 Sep 2022 13:20:16 +0000 (15:20 +0200)
src/orm/validator.php

index 104d089bb2d41737ac0b015141078d02cd15048c..fb9165de2a6a7d0b87abf23a681cbc85275316bb 100644 (file)
@@ -85,9 +85,9 @@ class IPF_ORM_Validator
         } else if ($type == 'decimal') {
             if (!$maximumLength)
                 $maximumLength = 18;
-            $length = strlen($value);
+            $length = $value ? strlen($value) : 0;
         } else {
-            $length = strlen($value);
+            $length = $value ? strlen($value) : 0;
         }
 
         if ($length > $maximumLength) {