Edit report at https://pear.php.net/bugs/bug.php?id=12071&edit=1

ID: 12071
Comment by: giunta.gaetano@gmail.com
Reported By: dninja@gmail.com
Summary: Error message: Assigning the return value of new by
reference is deprecated
Status: Closed
Type: Bug
Package: Mail
Operating System: arch linux
Package Version: 1.1.14
PHP Version: 5.2.4
Assigned To: chagenbu
Roadmap Versions:
New Comment:

Bug still valid with pear 1.9.4
Errors generated in Config.php, Registry.php, Installer/Role.php
A shame really that this is still happening in 2012

Previous Comments:

[2011-04-08 05:25:30] uqwfung

E_DEPERCATED is something out of E_ALL I guess. The workaround is here:

In PHP script, I put this line right before including Mail.php:

//Temporarily suppressing PHP 5.3 deprecated error message like
Mail::factory assigning the return value of new by reference
error_reporting( E_ALL & ~( E_NOTICE | E_STRICT | E_DEPRECATED ) );
require_once "Mail.php";

With dynamic error_reporting() setting within particular PHP script, PHP
engine will suppress those messages of deprecated function call while
the global error_reporting level remains unchanged for further


[2011-02-02 04:46:48] hm2k

-Status: Wont fix
+Status: Closed
Appears to have been fixed as per bug #16969...


[2010-02-02 04:50:01] jshpro2

Me too. I installed pear to install phing & phpunit. I am now
uninstalling your non-maintained framework for it's failure to keep up
with good standards :-)


[2010-01-08 02:44:31] hubbitus

In any case call nonstatic methods in static context is bad idea - it
will be prohibited in the future versions of PHP.


[2009-12-30 16:48:49] magnamel

Hi hubbitus,
thank your for your reply about my question
I have tried to call back the parseAddressList method in static manner.
I know that this is not correct but with a E_ALL & ~E_NOTICE error level
in php.ini the error is disappeared again.
The code in Mail.php is now the follow:

//$parser =& new Mail_RFC822();
$addresses = Mail_RFC822::parseAddressList($value, 'localhost', false);

Is this PHP4 compatible?



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedMay 30, '12 at 8:55a
activeMay 30, '12 at 8:55a

1 user in discussion

Giunta Gaetano: 1 post



site design / logo © 2022 Grokbase