Bug #18310: Log_composite can't work
| From: | koyama at hoge dot org | Date: | Fri, 12 Jul 2002 12:23:29 +0000 |
| Subject: | Bug #18310: Log_composite can't work | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-7684@lists.php.net to get a copy of this message | ||
From: koyama@hoge.org
Operating system: FreeBSD
PHP version: 4CVS-2002-07-12
PHP Bug Type: PEAR related
Bug description: Log_composite can't work
The newest Log_composite class can't work for some reason.
- Log_composite doesn't extend from Log class, but call notifyAll()
method in its log() method. The Log class has notifyAll().
- In addChild() method, put 'child' object to 'children' array with
$child->_listenerID key. The correct value is $child->_childID, isn't it?
I have a patch:
--- composite.php-orig Fri Jul 12 21:05:34 2002
+++ composite.php Fri Jul 12 21:07:59 2002
@@ -12,7 +12,7 @@
* @package Log
*/
-class Log_composite {
+class Log_composite extends Log {
/**
* Array holding all Log instances
@@ -112,7 +112,7 @@
$child->_childID = uniqid(rand());
- $this->children[$child->_listenerID] = &$child;
+ $this->children[$child->_childID] = &$child;
}
/**
--
Edit bug report at http://bugs.php.net/?id=18310&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18310&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18310&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18310&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18310&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18310&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18310&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18310&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18310&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18310&r=globals