Re: rev 14289 - Proper fix is not to define a new object; code was assuming header...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 1 Apr 2012 17:57:20 +0000 (17:57 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 1 Apr 2012 17:57:20 +0000 (17:57 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14301 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/mime/Message.class.php

index b4ec0bc3335075bcb11dc28290b3117e7c736965..d9282f759e0e478e0216208782326a1e580af652 100644 (file)
@@ -363,8 +363,8 @@ class Message {
                                 $hdr->type0 = 'text';
                                 $hdr->type1 = 'plain';
                                 $hdr->encoding = '7bit';
+                                $msg->header = $hdr;
                             } else {
-                                $msg->header = new MessageHeader();
                                 $msg->header->type0 = 'multipart';
                                 $msg->type0 = 'multipart';
                                 while ($read{$i} == '(') {
@@ -462,17 +462,17 @@ class Message {
                     $arg_a[] = $msg->parseLiteral($read, $i);
                     ++$arg_no;
                     break;
-        case '0':
+                case '0':
                 case is_numeric($read{$i}):
                     /* process integers */
                     if ($read{$i} == ' ') { break; }
-            ++$arg_no;
-            if (preg_match('/^([0-9]+).*/',substr($read,$i), $regs)) {
-                $i += strlen($regs[1])-1;
-                $arg_a[] = $regs[1];
-            } else {
-                $arg_a[] = 0;
-            }
+                    ++$arg_no;
+                    if (preg_match('/^([0-9]+).*/',substr($read,$i), $regs)) {
+                        $i += strlen($regs[1])-1;
+                        $arg_a[] = $regs[1];
+                    } else {
+                        $arg_a[] = 0;
+                    }
                     break;
                 case ')':
                     $multipart = (isset($msg->type0) && ($msg->type0 == 'multipart'));