From: berblinger at krumedia dot de Operating system: Linux PHP version: 5.2.9 PHP Bug Type: Reproducible crash Bug description: PHP crashes when errorHandler throws Exception
Description: ------------ Looks like this bug is related to the fixed bug #45805 in PHP version 5.2.8. php still crashes, when the source of the defective expression is called within a function-call. See reproduce code and comments inside for further details. Reproduce code: --------------- <?php function errorHandler($errno, $errstr, $errfile, $errline){ throw new Exception('test'); } set_error_handler('errorHandler'); error_reporting( E_ALL | E_STRICT); class Foo{ private $crashHelper = null; public function test(){ $bar = new Bar; /* Crashes */ //$bar->someFunction($this->crashHelper->notDefined); /* this works */ $tmp = $this->crashHelper->notDefined; $bar->someFunction($tmp); } } class Bar{ public function someFunction($tmp){ } } $foo = new Foo; $foo->test(); ?> Expected result: ---------------- Fatal error: Uncaught exception 'Exception' with message 'test' [...] thrown in /htdocs/test/pub/eerrorHandlerTest.php on line 3 Actual result: -------------- nothing. php crashes. -- Edit bug report at http://bugs.php.net/?id=47730&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47730&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47730&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47730&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47730&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47730&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47730&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47730&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47730&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47730&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47730&r=support Expected behavior: http://bugs.php.net/fix.php?id=47730&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47730&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47730&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47730&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47730&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47730&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47730&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47730&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47730&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47730&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47730&r=mysqlcfg