diff --git a/src/Primitive.php b/src/Primitive.php index be695a9..2cba7c8 100644 --- a/src/Primitive.php +++ b/src/Primitive.php @@ -46,7 +46,7 @@ class Primitive { public static function to_date($value) { $result = 0; - $tmp = explode("/", $value, 3); + $tmp = explode("/", $value ?? '', 3); if (!empty($tmp)) { if (count($tmp) != 3) return $result; diff --git a/src/Tools/StringUtil.php b/src/Tools/StringUtil.php index 70c92e6..8fb208f 100644 --- a/src/Tools/StringUtil.php +++ b/src/Tools/StringUtil.php @@ -73,7 +73,7 @@ class StringUtil { } static function mb_str_split($str) { - return preg_split('~~u', $str, null, PREG_SPLIT_NO_EMPTY); + return preg_split('~~u', $str, -1, PREG_SPLIT_NO_EMPTY); } static function mb_strtr($str, $from, $to) {