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

Bug #5890 Only variable references should be returned by reference
Submitted: 2005-11-07 21:36 UTC
From: nepto Assigned: cipri
Status: Closed Package: Mail_Mime
PHP Version: 4.4.0 OS: GNU/Linux
Roadmaps: 1.4.0    
Subscription  


 [2005-11-07 21:36 UTC] nepto
Description: ------------ Notice: "Only variable references should be returned by reference at ..." To prevent this warning apply patch below. Mail_mime version 1.3.1 Mail version 1.1.9 Test script: --------------- --- mime.php.ori 2005-11-07 14:27:03.000000000 -0700 +++ mime.php 2005-11-07 14:27:09.000000000 -0700 @@ -317,7 +317,8 @@ if (is_object($obj)) { return $obj->addSubpart($text, $params); } else { - return new Mail_mimePart($text, $params); + $x = new Mail_mimePart($text, $params); + return $x; } } @@ -590,7 +591,8 @@ } $this->_headers = array_merge($headers, $this->_headers); - return $this->_encodeHeaders($this->_headers); + $x = $this->_encodeHeaders($this->_headers); + return $x; } /** Expected result: ---------------- No warning, clean code execution. Actual result: -------------- Notice issued.

Comments

 [2007-05-05 15:09 UTC] cipri (Cipriano Groenendal)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Mail_Mime Fixed in 1.4.0