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

Bug #293 [Patch] PEAR_Error not calling static method callbacks for error-handler
Submitted: 2003-11-25 12:26 UTC
From: alan at caint dot com Assigned: cellog
Status: Closed Package: PEAR
PHP Version: Irrelevant OS: N/A
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 - 13 = ?

 
 [2003-11-25 12:26 UTC] alan at caint dot com
Description: ------------ If $this->callback is an array PEAR_Error only checks that the first element is an object. Patch uses is_callable() to check for valid callback. See: http://news.php.net/article.php?group=php.pear.dev&article=23777 Reproduce code: --------------- <?php class ErrHandler { function handleStaticErr($error) { echo 'Static: '. $error->getMessage(); } } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array('ErrHandler', 'handleStaticErr')); PEAR::raiseError('Test Error'); ?> Expected result: ---------------- Output ====== Static: Test Error Actual result: -------------- Output ======

Comments

 [2003-11-26 15:08 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.