From: pdontthink Date: Tue, 18 Jun 2019 06:59:25 +0000 (+0000) Subject: PHP7.2 fix (#2848) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=aab65dbd3d71ac2683b3959c238284c4444dea41;p=squirrelmail.git PHP7.2 fix (#2848) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14826 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mime.php b/functions/mime.php index 4802dd1f..8cf0f23d 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -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; }