From bf95f4e0adc4e2422e16a0659a9843d4b0f57dec Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 23 Feb 2019 07:13:52 +0000 Subject: [PATCH] When message being replied to has no Reply-To header, we use the From header to fill in the reply To address, so we have to account for that situation when building the Cc header git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14803 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compose.php b/src/compose.php index 4f5c5c3a..b5bf404d 100644 --- a/src/compose.php +++ b/src/compose.php @@ -175,8 +175,12 @@ function replyAllString($header) { /** * 1) Remove the addresses we'll be sending the message 'to' */ - if (isset($header->reply_to)) { + if (isset($header->reply_to) && is_array($header->reply_to) && count($header->reply_to)) { $excl_ar = $header->getAddr_a('reply_to'); + } else if (is_object($header->reply_to)) { /* unneccesarry, just for failsafe purpose */ + $excl_ar = $header->getAddr_a('reply_to'); + } else { + $excl_ar = $header->getAddr_a('from'); } /** * 2) Remove our identities from the CC list (they still can be in the -- 2.25.1