ID:               47730
 Updated by:       paj...@php.net
 Reported By:      berblinger at krumedia dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Linux
 PHP Version:      5.2.9
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-03-20 13:04:45] berblinger at krumedia dot de

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 this bug report at http://bugs.php.net/?id=47730&edit=1

Reply via email to