PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Logging » Log » Bug #5776

PHP 4.4 compat patch for observer.php

Details

Submitted2005-10-25 10:06 UTC
Fromroehr at zilleon dot com
Assignedjon
StatusClosed
PackageLog
PHP Version4.4.0
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-10-25 10:06 UTC] roehr at zilleon dot com

Description:
------------
Please find below a patch that brings observer.php up to PHP 4.4 compatibility and removes a CVS conflict in a comment block.

Thanks and best regards,

Torsten Roehr

Test script:
---------------
Index: observer.php
===================================================================
--- observer.php (revision 79)
+++ observer.php (working copy)
@@ -99,35 +99,25 @@
if (class_exists($class)) {
/* Support both new-style and old-style construction. */
if ($newstyle) {
- return new $class($priority, $conf);
+ return $object =& new $class($priority, $conf);
} else {
- return new $class($priority);
+ return $object =& new $class($priority);
}
}

- return false;
+ return $false = false;
}

/**
-<<<<<<< observer.php
* This is a stub method to make sure that Log_observer classes do
* something when they are notified of a message. The default
* behavior is to just print the message, which is obviously not
* desireable in practically any situation - which is why you need
* to override this method. :)
*
- * @param array $messageOb A hash containing all information - the text
- * message itself, the priority, what log it came
- * from, etc.
-=======
- * This is a stub method to make sure that Log_Observer classes do
- * something when they are notified of a message. The default behavior
- * is to just print the message, which is obviously not desireable in
- * practically any situation - which is why you need to override this
- * method. :)
- *
- * @param array $event A hash describing the log event.
->>>>>>> 1.5
+ * @param array $messageOb A hash containing all information - the text
+ * message itself, the priority, what log it came
+ * from, etc.
*/
function notify($event)
{