From b4316b34bb52a7dfd042e165226b4f4b975be654 Mon Sep 17 00:00:00 2001 From: tokul Date: Wed, 20 Jul 2005 08:47:47 +0000 Subject: [PATCH] Add extra checks in In-Reply-To header generation. Removes E_NOTICE level error in php 5.0.4+ (#1206474) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9787 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 4 +++- class/deliver/Deliver.class.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7e55866..56336139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -400,7 +400,9 @@ Version 1.5.1 -- CVS that don't support GNU C time zone mappings (#1177067). - Use default color theme in logout_error function when possible. - Fixes for increased error checking in PHP 5.1 array_shift() (#1237160). - + - Added extra checks in delivery class for In-Reply-To header. Fixes + E_NOTICE level warnings in php 5.0.4 and later (#1206474). [php5] + Version 1.5.0 - 2 February 2004 ------------------------------- - Added new preference that determines cursor focus when replying diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index 4d526a78..7652bcd3 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -445,7 +445,9 @@ class Deliver { /* Insert the rest of the header fields */ $header[] = 'Message-ID: '. $message_id . $rn; - if ($reply_rfc822_header->message_id) { + if (is_object($reply_rfc822_header) && + isset($reply_rfc822_header->message_id) && + $reply_rfc822_header->message_id) { $rep_message_id = $reply_rfc822_header->message_id; // $this->strip_crlf($message_id); $header[] = 'In-Reply-To: '.$rep_message_id . $rn; -- 2.25.1