Edit report at https://bugs.php.net/bug.php?id=64135&edit=1

 ID:                 64135
 Updated by:         dmi...@php.net
 Reported by:        za_creature at yahoo dot com
 Summary:            Exceptions from set_error_handler are not always
                     propagated
 Status:             Assigned
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   WOW64, CentOS6.3
 PHP Version:        5.4.11
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

I don't see any problems with the patch.


Previous Comments:
------------------------------------------------------------------------
[2013-02-04 07:00:04] larue...@php.net

patch attached,  but I think maybe only going into PHP 5.5, this could be 
considered a BC break.

what do you think, dmitry?  thanks

------------------------------------------------------------------------
[2013-02-04 06:56:12] larue...@php.net

The following patch has been added/updated:

Patch Name: bug64135.patch
Revision:   1359960972
URL:        
https://bugs.php.net/patch-display.php?bug=64135&patch=bug64135.patch&revision=1359960972

------------------------------------------------------------------------
[2013-02-02 16:55:11] za_creature at yahoo dot com

Description:
------------
echo $undefined works
$undefined++ works
$undefined->method() doesn't


Test script:
---------------
<?php

function exception_error_handler() {
        throw new Exception();
}

set_error_handler("exception_error_handler");
try {
        $undefined->method();
}
catch(Exception $e) {
        echo "Exception is thrown";
}


Expected result:
----------------
Exception is thrown

Actual result:
--------------
PHP Warning:  Uncaught exception 'Exception' in /home/radu/bug.php:4
Stack trace:
#0 /home/radu/bug.php(9): exception_error_handler(8, 'Undefined varia...', 
'/home/radu/bug....', 9, Array)
#1 {main}
  thrown in /home/radu/bug.php on line 4

Warning: Uncaught exception 'Exception' in /home/radu/bug.php:4
Stack trace:
#0 /home/radu/bug.php(9): exception_error_handler(8, 'Undefined varia...', 
'/home/radu/bug....', 9, Array)
#1 {main}
  thrown in /home/radu/bug.php on line 4
PHP Fatal error:  Call to a member function method() on a non-object in 
/home/radu/bug.php on line 9


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64135&edit=1

Reply via email to