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

Bug #8312 Only variable references should be returned by reference
Submitted: 2006-07-28 10:07 UTC
From: ross at golder dot org Assigned: cipri
Status: Bogus Package: Mail_Mime (version 1.3.1)
PHP Version: 5.1.4 OS: Ubuntu Dapper
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 : 23 + 9 = ?

 
 [2006-07-28 10:07 UTC] ross at golder dot org (Ross Golder)
Description: ------------ Notice: Only variable references should be returned by reference in /usr/share/php/Mail/mime.php on line 320 Notice: Only variable references should be returned by reference in /usr/share/php/Mail/mime.php on line 593 Notice: Only variable references should be returned by reference in /usr/share/php/Mail/mime.php on line 356 Notice: Only variable references should be returned by reference in /usr/share/php/Mail/mime.php on line 434 Notice: Only variable references should be returned by reference in /usr/share/php/Mail/mime.php on line 593 Warning: Cannot modify header information - headers already sent by... Test script: --------------- Sorry, not enough time. Patched locally already. Expected result: ---------------- No warnings/notices. Actual result: -------------- Lots of notices.

Comments

 [2006-07-28 10:11 UTC] ross at golder dot org
Well, I would attach my local patch but I can't seem to figure out how. Daft bug tracker. Here it is cut'n'pasted: --- mime.php.orig 2006-07-28 16:57:28.000000000 +0700 +++ mime.php 2006-07-28 17:00:14.000000000 +0700 @@ -315,10 +315,11 @@ $params['encoding'] = $this->_build_params['text_encoding']; $params['charset'] = $this->_build_params['text_charset']; if (is_object($obj)) { - return $obj->addSubpart($text, $params); + $part = $obj->addSubpart($text, $params); } else { - return new Mail_mimePart($text, $params); + $part = new Mail_mimePart($text, $params); } + return $part; } /** @@ -353,7 +354,8 @@ function &_addMixedPart() { $params['content_type'] = 'multipart/mixed'; - return new Mail_mimePart('', $params); + $part = new Mail_mimePart('', $params); + return $part; } /** @@ -430,7 +432,8 @@ $params['encoding'] = $value['encoding']; $params['disposition'] = 'attachment'; $params['dfilename'] = $value['name']; - $obj->addSubpart($value['body'], $params); + $part = $obj->addSubpart($value['body'], $params); + return $part; } /** @@ -590,7 +593,8 @@ } $this->_headers = array_merge($headers, $this->_headers); - return $this->_encodeHeaders($this->_headers); + $headers = $this->_encodeHeaders($this->_headers); + return $headers; } /**
 [2006-09-12 16:50 UTC] bytewise at gmx dot net (Robert)
Patch works for me (and I had the same problem). Please accept this patch.
 [2006-10-18 21:28 UTC] cipri (Cipriano Groenendal)
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PEAR. Duplicate of Bug #5333