The performance related extra if call caused a bug when trying to decode
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Jun 2003 20:22:20 +0000 (20:22 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Jun 2003 20:22:20 +0000 (20:22 +0000)
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

index 6c58f107a7f42d987fb2c2a8f03b66ccd779df3b..411e070e75e778056f1c80881bbeeee7d89fcf0d 100644 (file)
@@ -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 .= '&nbsp;';