浏览代码

fixed warning. isset doesn't work with string offsets > strlen

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

+ 1 - 1
class/mime/Rfc822Header.class.php

@@ -293,7 +293,7 @@ class Rfc822Header {
                 // check the next token in case comments appear in the middle of email addresses
                 $prevToken = end($aTokens);
                 if (!in_array($prevToken,$aSpecials,true)) {
-                    if (isset($address{$i+1}) && !in_array($address{$i+1},$aSpecials,true)) {
+                    if ($i+1<strlen($address) && !in_array($address{$i+1},$aSpecials,true)) {
                         $iEnd = strpos($address,' ',$i+1);
                         if ($iEnd) {
                             $sNextToken = trim(substr($address,$i+1,$iEnd - $i -1));