From 7ad19f28575d5bad9facd3fab1dcb944b8720ccd Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Thu, 10 Oct 2013 14:35:24 +0200 Subject: [PATCH] Fixed usage of deprecated method --- wcfsetup/install/files/lib/util/StringUtil.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/util/StringUtil.class.php b/wcfsetup/install/files/lib/util/StringUtil.class.php index 5c15871ed5..7589fbfe85 100644 --- a/wcfsetup/install/files/lib/util/StringUtil.class.php +++ b/wcfsetup/install/files/lib/util/StringUtil.class.php @@ -377,7 +377,7 @@ final class StringUtil { public static function split($string, $length = 1) { $result = array(); for ($i = 0, $max = self::length($string); $i < $max; $i += $length) { - $result[] = self::substring($string, $i, $length); + $result[] = mb_substr($string, $i, $length); } return $result; } @@ -396,7 +396,7 @@ final class StringUtil { $haystack = mb_strtolower($haystack); $needle = mb_strtolower($needle); } - // using substring and === is MUCH faster for long strings then using indexOf. + // using mb_substr and === is MUCH faster for long strings then using indexOf. return mb_substr($haystack, 0, mb_strlen($needle)) === $needle; } -- 2.20.1