Explorar el Código

Add extra checks in In-Reply-To header generation. Removes E_NOTICE level
error in php 5.0.4+ (#1206474)

tokul hace 20 años
padre
commit
06bee52aca
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 3 1
      ChangeLog
  2. 3 1
      class/deliver/Deliver.class.php

+ 3 - 1
ChangeLog

@@ -400,7 +400,9 @@ Version 1.5.1 -- CVS
     that don't support GNU C time zone mappings (#1177067).
     that don't support GNU C time zone mappings (#1177067).
   - Use default color theme in logout_error function when possible.
   - Use default color theme in logout_error function when possible.
   - Fixes for increased error checking in PHP 5.1 array_shift() (#1237160).
   - 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
 Version 1.5.0 - 2 February 2004
 -------------------------------
 -------------------------------
   - Added new preference that determines cursor focus when replying
   - Added new preference that determines cursor focus when replying

+ 3 - 1
class/deliver/Deliver.class.php

@@ -445,7 +445,9 @@ class Deliver {
 
 
         /* Insert the rest of the header fields */
         /* Insert the rest of the header fields */
         $header[] = 'Message-ID: '. $message_id . $rn;
         $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;
             $rep_message_id = $reply_rfc822_header->message_id;
         //        $this->strip_crlf($message_id);
         //        $this->strip_crlf($message_id);
             $header[] = 'In-Reply-To: '.$rep_message_id . $rn;
             $header[] = 'In-Reply-To: '.$rep_message_id . $rn;