PHP7.2 fix (#2848)
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 18 Jun 2019 06:59:25 +0000 (06:59 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 18 Jun 2019 06:59:25 +0000 (06:59 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14826 7612ce4b-ef26-0410-bec9-ea0150e637f0

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;
 }