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

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


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 22 + 46 = ?

 
 [2008-05-23 06: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 15:27 UTC] alec (Aleksander Machniak)
-Roadmap Versions: +Roadmap Versions: 1.6.0RC1
 [2009-12-30 17: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.