From b010ae0687beba8710b39f0de1bf3b945afe17c3 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 25 Jun 2003 20:22:20 +0000 Subject: [PATCH] The performance related extra if call caused a bug when trying to decode strings like: Blah=?iso8869-1?Q?blah?= git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5120 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 6c58f107..411e070e 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -599,7 +599,6 @@ function decodeHeader ($string, $utfencode=true,$htmlsave=true) { $encoded = false; /* if encoded words are not separated by a linear-space-white we still catch them */ $j = $i-1; - if ($chunk{0} === '=') { /* performance, saves an unnessecarry preg call */ while ($match = preg_match('/^(.*)=\?([^?]*)\?(Q|B)\?([^?]*)\?=(.*)$/Ui',$chunk,$res)) { /* if the last chunk isn't an encoded string then put back the space, otherwise don't */ if ($iLastMatch !== $j) { @@ -641,7 +640,6 @@ function decodeHeader ($string, $utfencode=true,$htmlsave=true) { $chunk = $res[5]; $encoded = true; } - } if (!$encoded) { if ($htmlsave) { $ret .= ' '; -- 2.25.1