From: Sascha Greuel Date: Thu, 10 Oct 2013 12:35:24 +0000 (+0200) Subject: Fixed usage of deprecated method X-Git-Tag: 2.0.0_Beta_11~34^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ad19f28575d5bad9facd3fab1dcb944b8720ccd;p=GitHub%2FWoltLab%2FWCF.git Fixed usage of deprecated method --- 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; }