diff --git a/file/lib/util/ChatUtil.class.php b/file/lib/util/ChatUtil.class.php index e2e715a..3d03ba5 100644 --- a/file/lib/util/ChatUtil.class.php +++ b/file/lib/util/ChatUtil.class.php @@ -120,7 +120,10 @@ public static function str_split($string, $length = 1) { * @return integer */ public static function timeModifier($time) { - preg_match_all('!([0-9]+[s|h|d|w|m|y]?)!i', $time, $matches); + $regex = new \wcf\system\Regex('([0-9]+[s|h|d|w|m|y]?)', \wcf\system\Regex::CASE_INSENSITIVE); + if (!$regex->match($time, true)) return 0; + $matches = $regex->getMatches(); + $result = 0; foreach ($matches[1] as $time) { // 60 seconds a minute