Home » Logging » Log » Bug #5261
Bogus notice in pa : Only variable references should be returned by reference
Details
| Submitted | 2005-09-01 08:42 UTC |
|---|---|
| From | blaise at thauvin dot org |
| Assigned | jon |
| Status | Closed |
| Package | Log |
| PHP Version | 5.1.0 |
| OS | Win 2K |
| Roadmaps | (Not assigned) |
Comments
[2005-09-01 08:42 UTC] blaise at thauvin dot org
Description:
------------
Since I upgraded fro PHP 5.0 to PHP 5.1, a new error notices appears everytime I use the Log class :
Only variable references should be returned by reference ...
from line 128 in Log.php
Functionnalities do not seem to be affected though.
I corrected the problem with a simple modification of line 128. I replaced :
return new $class($name, $ident, $conf, $level);
With
$temp = new $class($name, $ident, $conf, $level);
return $temp;
Hope this helps.
Blaise
Expected result:
----------------
I expect no error message.
[2005-12-30 11:56 UTC] ivan dot moretti at hispeed dot ch
I'm using PHP 4.3.10 and this fix affects behaviour of Log_Mail: when Log_Mail::close() is fired, $_opened is always false, thus mail is never sent.
Line 130 in Log.php should look like this:
$obj = &new $class($name, $ident, $conf, $level);