X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fread_body.php;h=e0777db5f625cb72a169aee92d16958866e18872;hp=d3302e3b7296158f29bbbf2c9b1f045c897b35b2;hb=23fd3c8ebf96b73c2d4d09e80c04d5031fb8fc13;hpb=434666c7ad8b67074d0f57fe8c45ecf8481f40c1 diff --git a/src/read_body.php b/src/read_body.php index d3302e3b..e0777db5 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -165,6 +165,8 @@ // add them to the list. Remove duplicates. // This is somewhat messy, so I'll explain: // 1) Take all addresses (from, to, cc) (avoid nasty join errors here) + if (!is_array($message->header->to)) { $message->header->cc = array($message->header->to); } + if (!is_array($message->header->cc)) { $message->header->cc = array($message->header->cc); } $url_replytoall_extra_addrs = array_merge(array($message->header->from), $message->header->to, $message->header->cc); @@ -175,7 +177,9 @@ $url_replytoall_extra_addrs = parseAddrs($url_replytoall_extra_addrs); // 4) Make them unique -- weed out duplicates - $url_replytoall_extra_addrs = array_unique($url_replytoall_extra_addrs); + if (function_exists("array_unique")) { + $url_replytoall_extra_addrs = array_unique($url_replytoall_extra_addrs); + } // 5) Remove the addresses we'll be sending the message 'to' $url_replytoall_avoid_addrs = parseAddrs($message->header->replyto);