php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18310 Log_composite can't work
Submitted: 2002-07-12 08:23 UTC Modified: 2002-08-23 06:49 UTC
From: koyama at hoge dot org Assigned:
Status: Closed Package: PEAR related
PHP Version: 4CVS-2002-07-12 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: koyama at hoge dot org
New email:
PHP Version: OS:

 

 [2002-07-12 08:23 UTC] koyama at hoge dot org
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;
     }

     /**


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-23 06:49 UTC] mj@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Aug 01 15:01:24 2021 UTC