From: elg at op dot pl Operating system: windows PHP version: 5.1.1 PHP Bug Type: Compile Warning Bug description: throwing an exception in error handler is makeing it display a warning
Description: ------------ I wanted to convert errors to exceptions by writing an error handler that throws them as exceptions. Then I wanted to check if it works so I tried to include a non existing file (info.txt) Reproduce code: --------------- <?php function exceptionHandler($exc){ echo ':)'; } function ErrorsToExceptions($severity, $message) { throw new ErrorException($message,0, $severity); } set_exception_handler('exceptionHandler'); set_error_handler('ErrorsToExceptions'); include'dupa.txt'; ?> Expected result: ---------------- :) Actual result: -------------- Warning: main() [function.include]: Failed opening 'info.txt' for inclusion (include_path='.;C:\php5\pear') in E:\usr\\www\index.php on line 8 :) -- Edit bug report at http://bugs.php.net/?id=35626&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35626&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35626&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35626&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35626&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35626&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35626&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35626&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35626&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35626&r=support Expected behavior: http://bugs.php.net/fix.php?id=35626&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35626&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35626&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35626&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35626&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35626&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35626&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35626&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35626&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35626&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35626&r=mysqlcfg