|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-10 06:36 UTC] cox@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
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