PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Logging » Log » Bug #5261

Bogus notice in pa : Only variable references should be returned by reference

Details

Submitted2005-09-01 08:42 UTC
Fromblaise at thauvin dot org
Assignedjon
StatusClosed
PackageLog
PHP Version5.1.0
OSWin 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);