Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.14.4

Bug #12675 Cannot instantiate a handler
Submitted: 2007-12-12 21:04 UTC
From: redbeard Assigned: jon
Status: Closed Package: Log (version 1.9.12)
PHP Version: 4.4.4 OS: Debian 4.0 (Etch)
Roadmaps: 1.9.13    
Subscription  


 [2007-12-12 21:04 UTC] redbeard (Michael Johnson)
Description: ------------ Code I had been using (see below) returns NULL instead of a Log_Composite object. Downgrading to 1.9.11 returns behavior to normal. A quick look shows that lines 141 and 146 use PHP 5 specific parameters to class_exists(). Removing the false parameter fixes the problem. Test script: --------------- <?php ; require_once('Log.php'); $logger =& Log::singleton('composite', '', 'identity'); var_export($logger); ?> Expected result: ---------------- lass log_composite { var $_opened = false; var $_id = 0; var $_ident = 'identity'; var $_priority = 6; var $_mask = 255; var $_listeners = array ( ); var $_formatMap = array ( '%{timestamp}' => '%1$s', '%{ident}' => '%2$s', '%{priority}' => '%3$s', '%{message}' => '%4$s', '%{file}' => '%5$s', '%{line}' => '%6$s', '%{function}' => '%7$s', '%\\{' => '%%{', ); var $_children = array ( ); } Actual result: -------------- Warning: Wrong parameter count for class_exists() in /usr/share/php/Log.php on line 141 Warning: Wrong parameter count for class_exists() in /usr/share/php/Log.php on line 146 NULL

Comments

 [2007-12-13 06:47 UTC] jon (Jon Parise)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.