Home » Mail » Mail_Mime » Bug #5400
Do not return function reference
Details
| Submitted | 2005-09-14 14:39 UTC |
|---|---|
| From | pear at borki dot ch |
| Assigned | cipri |
| Status | Closed |
| Package | Mail_Mime |
| PHP Version | 4.3.11 |
| OS | FreeBSD 5.4-p6 |
| Roadmaps | 1.4.0 |
Comments
[2005-09-14 14:39 UTC] pear at borki dot ch
Description:
------------
NOTICE Only variable references should be returned by reference
inc/pear/Mail/mime.php:320
Fix: First put the new Object in a variable, then return... maybe there are similar problems elsewhere..
Test script:
---------------
diff -r1.2 mime.php
320c320,321
< return new Mail_mimePart($text, $params);
---
> $mimePart = new Mail_mimePart($text, $params);
> return $mimePart;
Expected result:
----------------
function without NOTICE
Actual result:
--------------
NOTICE with the error message