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

Bug #16743 Warning in 5.3.0: Assigning the return value of new by reference is deprecated
Submitted: 2009-10-27 00:13 UTC
From: dwchrist Assigned: jon
Status: Closed Package: Log (version 1.11.5)
PHP Version: 5.3.0 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-10-27 00:13 UTC] dwchrist (darcy w. christ)
Description: ------------ Warning in 5.3.0 Assigning the return value of new by reference is deprecated (pear/Log.php 169) $obj = &new $class($name, $ident, $conf, $level);

Comments

 [2009-11-11 18:22 UTC] deweller (Devon Weller)
I also get this problem.
 [2009-12-19 13:22 UTC] zozowind (Zhijie Chen)
the same bug when using php 5.3.0 Deprecated: Assigning the return value of new by reference is deprecated in /Applications/xampp/xamppfiles/lib/php/pear/MDB2.php on line 390 Deprecated: Assigning the return value of new by reference is deprecated in /Applications/xampp/xamppfiles/lib/php/pear/MDB2.php on line 1885 Deprecated: Assigning the return value of new by reference is deprecated in /Applications/xampp/xamppfiles/lib/php/pear/MDB2.php on line 2572 Deprecated: Assigning the return value of new by reference is deprecated in /Applications/xampp/xamppfiles/lib/php/pear/MDB2.php on line 2595 Deprecated: Assigning the return value of new by reference is deprecated in /Applications/xampp/xamppfiles/lib/php/pear/MDB2.php on line 2940 I think the problem is $sth =& new $class()??
 [2009-12-26 22:05 UTC] jon (Jon Parise)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: jon
 [2009-12-26 22:13 UTC] jon (Jon Parise)
zozowind's problem appears to be originating in the MDB2 package, not the Log package.
 [2009-12-26 22:18 UTC] jon (Jon Parise)
-Status: Assigned +Status: Feedback
Could someone please attach a script that reproduces this warning? I would also like to see the error_reporting() settings. I'm open to fixing this problem by releasing a PHP5-aware version of the Log package, but I want to make sure I cover all of the different possible configurations.
 [2009-12-27 20:53 UTC] slaakso (Seppo Laaksonen)
When having following error_reporting in php.ini: error_reporting = E_ALL The script: ---- <?php require_once 'Log.php'; $conf = array(); $logFileName = dirname(__FILE__) . '/pearlog.log'; $log = &Log::singleton( 'file', $logFileName, 'LOG', $conf ); global $log; $log->info('log test'); ?> ---- will produce an error: "Deprecated: Assigning the return value of new by reference is deprecated in /opt/local/lib/php/Log.php on line 169"
 [2009-12-27 23:57 UTC] jon (Jon Parise)
-Status: Feedback +Status: Closed
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/ I've decided to drop PHP4 compatibility for the 1.12.* release line. If you grab the 1.12.0RC1 release (just published), you should no longer see the deprecation warning.