浏览代码

PHP7.2 fix (#2848)

pdontthink 6 年之前
父节点
当前提交
73fbd94545
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      functions/mime.php

+ 2 - 2
functions/mime.php

@@ -1397,8 +1397,8 @@ function sq_casenormalize(&$val){
 function sq_skipspace($body, $offset){
     $me = 'sq_skipspace';
     preg_match('/^(\s*)/s', substr($body, $offset), $matches);
-    if (sizeof($matches{1})){
-        $count = strlen($matches{1});
+    if (!empty($matches[1])){
+        $count = strlen($matches[1]);
         $offset += $count;
     }
     return $offset;