Add extra checks in In-Reply-To header generation. Removes E_NOTICE level
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 20 Jul 2005 08:47:47 +0000 (08:47 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 20 Jul 2005 08:47:47 +0000 (08:47 +0000)
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
class/deliver/Deliver.class.php

index e7e558665f0e57d4efc656fdad727e822e491858..56336139eaa5a6d4a6850224dc45933ed9c09f71 100644 (file)
--- 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).
     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
 Version 1.5.0 - 2 February 2004
 -------------------------------
   - Added new preference that determines cursor focus when replying
index 4d526a78e32d33ff2818bce74bbcba18673c0af8..7652bcd36923145e4b748219644adc67c5c98151 100644 (file)
@@ -445,7 +445,9 @@ class Deliver {
 
         /* Insert the rest of the header fields */
         $header[] = 'Message-ID: '. $message_id . $rn;
 
         /* 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;
             $rep_message_id = $reply_rfc822_header->message_id;
         //        $this->strip_crlf($message_id);
             $header[] = 'In-Reply-To: '.$rep_message_id . $rn;