From: pdontthink Date: Fri, 4 Nov 2016 02:41:57 +0000 (+0000) Subject: More sensible identity selection X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=177f93ea0a5e4f1ed25091e0b0834194aea3035c;p=squirrelmail.git More sensible identity selection git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14606 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/mime/Rfc822Header.class.php b/class/mime/Rfc822Header.class.php index 799d88cf..9386cf89 100644 --- a/class/mime/Rfc822Header.class.php +++ b/class/mime/Rfc822Header.class.php @@ -970,7 +970,7 @@ class Rfc822Header { * Looks through this list of addresses and * returns the array index (an integer even * if the array is given with keys of a - * different type) of the *last* matching + * different type) of the first matching * $address found in this message's * TO or CC headers, unless there is an exact * match (meaning that the "personal @@ -1002,10 +1002,10 @@ class Rfc822Header { $i=0; foreach($address as $argument) { $match = $this->findAddress($argument, true); - if ($match[1]) { + if ($match[1]) { // this indicates when the personal information matched return $i; } else { - if (count($match[0]) && !$result) { + if (count($match[0]) && $result === FALSE) { $result = $i; } }