PHP7.2 fix (#2848)
[squirrelmail.git] / functions / mime.php
index 4802dd1f18348f07d98305c5384408c4a7682262..8cf0f23d6fc9dc36af6a3c05f7cc8b1633a90e22 100644 (file)
@@ -1397,9 +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});
-        $offset += $count;
+    if (!empty($matches[1])){
+        $offset += strlen($matches[1]);
     }
     return $offset;
 }