#24528 [Asn->Csd]: PEAR_Error() hides fatal error when the class method error handler called

From: Date: Thu, 10 Jul 2003 11:36:12 +0000
Subject: #24528 [Asn->Csd]: PEAR_Error() hides fatal error when the class method error handler called
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18128@lists.php.net to get a copy of this message
ID: 24528 Updated by: cox@php.net Reported By: akimoto at share360 dot com -Status: Assigned +Status: Closed Bug Type: PEAR related Operating System: Windows XP pro PHP Version: 4.3.3RC1 Assigned To: cox New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-07-08 00:37:44] akimoto at share360 dot com Description: ------------ When you set PEAR error handler with object's method, any fatal error occuring in the handler does not show the fatal error message generated by PHP, just dies instead. Fatal error should be caught and recognized. This issue makes it very difficult to chase PHP system level error. PEAR.php line 768 (in 1.2b2) @call_user_func($this->callback, $this); should not have atmark. Reproduce code: --------------- <?php require_once('PEAR.php'); class DummyForFatalError { function DummyForFatalError(&$arg1) {} } class MyErrorHandler { function handlerMethod() { new DummyForFatalError(null); // cannot pass null as reference parameter } } $errorHandlerClass = new MyErrorHandler(); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(&$errorHandlerClass, 'handlerMethod')); class MyPear extends PEAR { function invokeError() { PEAR::throwError(null, '123', 'userinfo'); } } MyPear::invokeError(); echo "End of script"; ?> Expected result: ---------------- Fatal error: Cannot pass parameter 1 by reference in C:\Program Files\Apache Group\Apache2\htdocs\reproduce.php on line 8 Actual result: -------------- blank page ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24528&edit=1

« previous php.pear.dev (#18128) next »