ID: 29312 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: WinXP w/SP1 PHP Version: 5.0.0 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2004-07-22 00:09:34] [EMAIL PROTECTED] Description: ------------ When supplying an object/method callback for set_exception_handler it does not work if no exception message is passed. If you use a function of a static method it works fine. If you pass a message, it also works as expected - Davey Reproduce code: --------------- <?php class exception_handler { function handle_exception($exception) { var_dump($exception); } } $exception_handler = new exception_handler; set_exception_handler(array($exception_handler, 'handle_exception')); throw new Exception; ?> Expected result: ---------------- object(Exception)#1 (6) { ["message:protected"]=> string(0) "" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(53) "D:\web\php-mag\shafikdavey_errorhandling\listing2.txt" ["line:protected"]=> int(12) ["trace:private"]=> array(0) { } } Actual result: -------------- <br /> <b>Fatal error</b>: Uncaught exception 'Exception' in D:\web\php-mag\shafikdavey_errorhandling\listing2.txt:12 Stack trace: #0 {main} thrown in <b>D:\web\php-mag\shafikdavey_errorhandling\listing2.txt</b> on line <b>12</b><br /> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29312&edit=1