From bbc9d0e7fe1f593515b0caa02febeddd0a7cf76f Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Thu, 18 Jan 2024 17:42:44 +0300 Subject: [PATCH] fix: php8 --- src/Primitive.php | 2 +- src/Tools/StringUtil.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {