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  


 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!