Browse Source

Deprecated: iconv_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in C:\MyPrograms\OSPanel\domains\enginegp.local\system\library\system.php on line 690

Sergei Solovev 2 years ago
parent
commit
7762e3a0a2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      system/library/system.php

+ 4 - 0
system/library/system.php

@@ -687,6 +687,10 @@
 
         public static function strlen($str)
         {
+            if ($str === null) {
+                return 0;
+            }
+
             return iconv_strlen($str, 'UTF-8');
         }