#38 [Opn->Ver]: Undefined variable in mimedecode.php

From: Date: Sat, 18 Oct 2003 09:20:29 +0000
Subject: #38 [Opn->Ver]: Undefined variable in mimedecode.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22783@lists.php.net to get a copy of this message
ID: 38 Updated by: heino@php.net Reported By: marcus at synchromedia dot co dot uk -Status: Open +Status: Verified Bug Type: Mail_Mime Operating System: Irrelevant PHP Version: 4.3.2 Previous Comments: ------------------------------------------------------------------------ [2003-09-26 11:35:57] marcus at synchromedia dot co dot uk Description: ------------ I keep seeing these errors when I'm handling bounces: PHP Notice: Undefined variable: parts in /usr/local/ lib/php/Mail/ mimeDecode.php on line 470 That's this function: function _boundarySplit($input, $boundary) { $tmp = explode('--'.$boundary, $input); for ($i=1; $i<count($tmp)-1; $i++) { $parts[] = $tmp[$i]; } return $parts; } Obviously, if no boundaries are present in the message, $parts remains undefined. All that's need to fix it is $parts = array(); as the first line of the function. My copy of this file is labelled version 1.34. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=38&edit=1

« previous php.pear.dev (#22783) next »