Correct disappearing addresses when address book entry has email address without...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 6 Feb 2008 08:14:37 +0000 (08:14 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 6 Feb 2008 08:14:37 +0000 (08:14 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12922 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/mime/Rfc822Header.class.php

index f63ca76..b36c48e 100644 (file)
@@ -607,8 +607,13 @@ class Rfc822Header {
                          $aAddrBookAddress = $this->parseAddress($aAddr['email'],true);
                      } else {
                          $iPosAt = strpos($aAddr['email'], '@');
-                         $oAddr->mailbox = substr($aAddr['email'], 0, $iPosAt);
-                         $oAddr->host = substr($aAddr['email'], $iPosAt+1);
+                         if ($iPosAt === FALSE) {
+                             $oAddr->mailbox = $aAddr['email'];
+                             $oAddr->host = '';
+                         } else {
+                             $oAddr->mailbox = substr($aAddr['email'], 0, $iPosAt);
+                             $oAddr->host = substr($aAddr['email'], $iPosAt+1);
+                         } 
                          if (isset($aAddr['name'])) {
                              $oAddr->personal = $aAddr['name'];
                          } else {