[dev] Fwd: Horde Bug
Chuck Hagenbuch
chuck at horde.org
Thu Apr 3 21:33:03 PST 2003
----- Forwarded message from tjchae at engmail.uwaterloo.ca -----
Date: Thu, 3 Apr 2003 18:24:08 -0800
From: Tae Joon Chae <tjchae at engmail.uwaterloo.ca>
Reply-To: Tae Joon Chae <tjchae at engmail.uwaterloo.ca>
Subject: Horde Bug
To: chuck at horde.org
Hey, I just wanted to report a bug and I couldn't find a way to submit a bug
request without a login.
In Horde::logMessage, $logger is a static variable but when it gets
instantiated, the logger is being instantiated and saved as a reference. You
cannot save a reference into a static variable because static variables are
references themselves.
$logger = &Log::singleton($conf['log']['type'],
$conf['log']['name'],
$conf['log']['ident'],
$conf['log']['params']);
should be
$logger = Log::singleton($conf['log']['type'],
$conf['log']['name'],
$conf['log']['ident'],
$conf['log']['params']);
A simple way to test is to echo 'test message'; in the if (!isset($logger))
{} block to see if the logger is being instantiated multiple times. You will
find that it is with $logger = &Log.
http://www.php.net/manual/en/language.variables.scope.php has a blurb on
this issue. Thanks a lot for the great work. If there is some way I could
gain access to either the bug repository or the CVS, I would most definitely
appreciate it. Thanks.
Louis
----- End forwarded message -----
-chuck
--
Charles Hagenbuch, <chuck at horde.org>
"... It is not more light we need, but more warmth! We die of cold, not of
darkness. It is not the night that kills, but the frost." - Miguel de
Unamuno
More information about the dev
mailing list