浏览代码

If loop exit is caused by $i being greater than or equal to $cnt, do try to append the non existent value

indiri69 19 年之前
父节点
当前提交
e1677776db
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      class/mime/Rfc822Header.class.php

+ 4 - 2
class/mime/Rfc822Header.class.php

@@ -179,7 +179,9 @@ class Rfc822Header {
                         }
                         $result .= $value{$i};
                     }
-                    $result .= $value{$i};
+                    if($i < $cnt) {
+                        $result .= $value{$i};
+                    }
                     break;
                 case '(':
                     $depth = 1;
@@ -938,4 +940,4 @@ class Rfc822Header {
     }
 }
 
-?>
+?>