From: pdontthink Date: Sun, 1 Apr 2012 17:57:20 +0000 (+0000) Subject: Re: rev 14289 - Proper fix is not to define a new object; code was assuming header... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=af52f678df4e6100f061c6a4a26ad180ecb54980;p=squirrelmail.git Re: rev 14289 - Proper fix is not to define a new object; code was assuming header that was already defined was placed in the message object (which it was not). Also fix indention issues git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14301 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/mime/Message.class.php b/class/mime/Message.class.php index b4ec0bc3..d9282f75 100644 --- a/class/mime/Message.class.php +++ b/class/mime/Message.class.php @@ -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'));