Make sure a token isn't blank before adding it
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 22 Aug 2003 16:58:54 +0000 (16:58 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 22 Aug 2003 16:58:54 +0000 (16:58 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5546 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/mime/Rfc822Header.class.php

index 9f495f2..6cefdb1 100644 (file)
@@ -234,7 +234,7 @@ class Rfc822Header {
                    $i = $iEnd;
                 }
                 $sToken = str_replace($aReplace, $aSpecials,$sToken);
-                $aTokens[] = $sToken;
+                if($sToken) $aTokens[] = $sToken;
                 break;
             case '"':
                 $iEnd = strpos($address,$cChar,$i+1);
@@ -310,11 +310,11 @@ class Rfc822Header {
                         array_pop($aTokens);
                         // create token and add it again
                         $sNewToken = $prevToken . $sNextToken;
-                        $aTokens[] = $sNewToken;
+                        if($sNewToken) $aTokens[] = $sNewToken;
                     }
                 }
                 $sToken = str_replace($aReplace, $aSpecials,$sToken);
-                $aTokens[] = $sToken;
+                if($sToken) $aTokens[] = $sToken;
                 break;
             case ',':
             case ':':