Browse Source

Fixes bug 695150 in the 1.4.x stream
Not sure yet if/how to push it back to 1.2.x

Erin Schnabel 22 years ago
parent
commit
5c622f417c
2 changed files with 5 additions and 4 deletions
  1. 2 1
      ChangeLog
  2. 3 3
      class/mime/Message.class.php

+ 2 - 1
ChangeLog

@@ -33,7 +33,8 @@ Version 1.4.0 CVS
   - Fixed handling of encoding/decoding strings.
   - Fixed wrong array_slice call for a subset of the headers.
   - Allow encoded personal names in compose.php.
-  - Improved addresparsing from addresses coming from the compose form.
+  - Improved address parsing from addresses coming from the compose form.
+  - Fixed uninitialized indices when parsing attachments.
 
 Version 1.4.0 RC 2a
 -------------------

+ 3 - 3
class/mime/Message.class.php

@@ -443,9 +443,9 @@ class Message {
 
             $hdr->date = getTimeStamp($d); /* argument 1: date */
             $hdr->subject = $arg_a[1];     /* argument 2: subject */
-            $hdr->from = $arg_a[2][0];     /* argument 3: from        */
-            $hdr->sender = $arg_a[3][0];   /* argument 4: sender      */
-            $hdr->replyto = $arg_a[4][0];  /* argument 5: reply-to    */
+            $hdr->from = is_array($arg_a[2]) ? $arg_a[2][0] : '';     /* argument 3: from        */
+            $hdr->sender = is_array($arg_a[3]) ? $arg_a[3][0] : '';   /* argument 4: sender      */
+            $hdr->replyto = is_array($arg_a[4]) ? $arg_a[4][0] : '';  /* argument 5: reply-to    */
             $hdr->to = $arg_a[5];          /* argument 6: to          */
             $hdr->cc = $arg_a[6];          /* argument 7: cc          */
             $hdr->bcc = $arg_a[7];         /* argument 8: bcc         */