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

Bug #2120 Undefined variable: parts in mimeDecode.php on line 469
Submitted: 2004-08-13 08:30 UTC
From: roy at pine dot nl Assigned: sean
Status: Closed Package: Mail_Mime
PHP Version: 4.3.8 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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 : 37 - 29 = ?

 
 [2004-08-13 08:30 UTC] roy at pine dot nl
Description: ------------ It sometimes happens that there are no $parts found and the function will then generate a notice: function _boundarySplit($input, $boundary) { $tmp = explode('--'.$boundary, $input); for ($i=1; $i<count($tmp)-1; $i++) { $parts[] = $tmp[$i]; } return $parts; } You should probably add '$parts= array();' at the beginning of the function to fix the problem.

Comments

 [2004-09-28 21:12 UTC] administrator at modomail dot com
Actuall, it's this line: $parts[] = $tmp[$i]; That is the problem. Try: function _boundarySplit($input, $boundary) { $parts = array(); $tmp = explode('--'.$boundary, $input); for ($i=1; $i<count($tmp)-1; $i++) { array_push ($parts, $tmp[$i]); } return $parts; }
 [2004-09-29 07:19 UTC] roy at pine dot nl
You are right.
 [2004-12-08 17:31 UTC] sean
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. Fixed by george in mimeDecode.php 1.40