浏览代码

The performance related extra if call caused a bug when trying to decode
strings like:

Blah=?iso8869-1?Q?blah?=

stekkel 22 年之前
父节点
当前提交
3512790d72
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      functions/mime.php

+ 0 - 2
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 .= ' ';