File tree 3 files changed +29
-1
lines changed
3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ PHP NEWS
39
39
40
40
- PHPDBG:
41
41
. Fixed bug GH-15901 (phpdbg: Assertion failure on i funcs). (cmb)
42
+ . Fixed bug GH-16181 (phpdbg: exit in exception handler reports fatal error).
43
+ (cmb)
42
44
43
45
- SimpleXML:
44
46
. Fixed bug GH-15837 (Segmentation fault in ext/simplexml/simplexml.c).
Original file line number Diff line number Diff line change @@ -907,7 +907,7 @@ PHPDBG_COMMAND(run) /* {{{ */
907
907
}
908
908
} zend_end_try ();
909
909
910
- if (EG (exception )) {
910
+ if (EG (exception ) && ! zend_is_unwind_exit ( EG ( exception )) ) {
911
911
phpdbg_handle_exception ();
912
912
}
913
913
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-16181 (phpdbg: exit in exception handler reports fatal error)
3
+ --PHPDBG--
4
+ r
5
+ c
6
+ q
7
+ --FILE--
8
+ <?php
9
+ set_exception_handler (function () {
10
+ echo "exception caught \n" ;
11
+ die;
12
+ });
13
+
14
+ echo "throwing exception \n" ;
15
+ throw new \Exception ("oh noes " );
16
+ ?>
17
+ --EXPECTF--
18
+ [Successful compilation of %s]
19
+ prompt> throwing exception
20
+ [Uncaught Exception in %s on line %d: oh noes]
21
+ >00008: throw new \Exception("oh noes");
22
+ 00009: ?>
23
+ 00010:
24
+ prompt> exception caught
25
+ [Script ended normally]
26
+ prompt>
You can’t perform that action at this time.
0 commit comments