PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail_Mime » Bug #5400

Do not return function reference

Details

Submitted2005-09-14 14:39 UTC
Frompear at borki dot ch
Assignedcipri
StatusClosed
PackageMail_Mime
PHP Version4.3.11
OSFreeBSD 5.4-p6
Roadmaps1.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