fix: php8

This commit is contained in:
origami11@yandex.ru 2024-01-18 17:42:44 +03:00
parent d6864daae4
commit bbc9d0e7fe
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ class Primitive {
public static function to_date($value) public static function to_date($value)
{ {
$result = 0; $result = 0;
$tmp = explode("/", $value, 3); $tmp = explode("/", $value ?? '', 3);
if (!empty($tmp)) { if (!empty($tmp)) {
if (count($tmp) != 3) return $result; if (count($tmp) != 3) return $result;

View file

@ -73,7 +73,7 @@ class StringUtil {
} }
static function mb_str_split($str) { 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) { static function mb_strtr($str, $from, $to) {