Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.8.8

Request #13962 Improve Multiple header support
Submitted: 2008-05-23 01:27 UTC Modified: 2009-12-30 12:22 UTC
From: kawai Assigned: alec
Status: Closed Package: Mail_Mime (version 1.5.2)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: 1.6.0RC1    
Subscription  


 [2008-05-23 01:27 UTC] kawai (Hiroaki Kawai)
Description: ------------ Current 1.5.2 have a problem when we want to pass a multiple headers that has the same header name like 'Received:'. Mail_mimeDecode serves the header as an array if the mail has multiple header. Test script: --------------- <?php require_once('Mail/mime.php'); require_once('Mail/mimeDecode.php'); $txt=join("\r\n", array("Recieved: TX-POST id zwr1333; Fri, 23 May 2008 12:41:40 +0900 (JST)", "Recieved: TX-POST2 id far123dp; Fri, 23 May 2008 12:41:35 +0900 (JST)", "From: sample@example.jp", "", "sample code")); $obj = new Mail_mimeDecode($txt); $mail = $obj->decode(); $mime = new Mail_mime(); $r = $mime->txtHeaders($mail->headers); var_dump($r); Expected result: ---------------- string(184) "MIME-Version: 1.0 recieved: TX-POST id zwr1333; Fri, 23 May 2008 12:41:40 +0900 (JST) recieved: TX-POST2 id far123dp; Fri, 23 May 2008 12:41:35 +0900 (JST) from: sample@example.jp " Actual result: -------------- <br /> <b>Warning</b>: preg_match() expects parameter 2 to be string, array given in <b>D:\apache\front\libphp\Mail\mime.php</b> on line <b>927</b><br /> string(61) "MIME-Version: 1.0 recieved: Array from: sample@example.jp "

Comments

 [2009-12-29 10:27 UTC] alec (Aleksander Machniak)
-Roadmap Versions: +Roadmap Versions: 1.6.0RC1
 [2009-12-30 12:22 UTC] alec (Aleksander Machniak)
-Status: Open +Status: Closed -Assigned To: +Assigned To: alec
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.