From aab65dbd3d71ac2683b3959c238284c4444dea41 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Tue, 18 Jun 2019 06:59:25 +0000 Subject: [PATCH] PHP7.2 fix (#2848) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14826 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; } -- 2.25.1