1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3' into PHP-8.4

* PHP-8.3:
  Fix GH-16181: phpdbg: exit in exception handler reports fatal error
This commit is contained in:
Christoph M. Becker
2024-10-03 11:38:31 +02:00
3 changed files with 31 additions and 1 deletions

4
NEWS
View File

@@ -52,6 +52,10 @@ PHP NEWS
. Fixed bug GH-16009 (Segmentation fault with frameless functions and
undefined CVs). (nielsdos)
- PHPDBG:
. Fixed bug GH-16181 (phpdbg: exit in exception handler reports fatal error).
(cmb)
- Reflection:
. Fixed bug GH-16122 (The return value of ReflectionFunction::getNamespaceName()
and ReflectionFunction::inNamespace() for closures is incorrect). (timwolla)

View File

@@ -904,7 +904,7 @@ free_cmd:
}
} zend_end_try();
if (EG(exception)) {
if (EG(exception) && !zend_is_unwind_exit(EG(exception))) {
phpdbg_handle_exception();
}
}

View File

@@ -0,0 +1,26 @@
--TEST--
GH-16181 (phpdbg: exit in exception handler reports fatal error)
--PHPDBG--
r
c
q
--FILE--
<?php
set_exception_handler(function() {
echo "exception caught\n";
die;
});
echo "throwing exception\n";
throw new \Exception("oh noes");
?>
--EXPECTF--
[Successful compilation of %s]
prompt> throwing exception
[Uncaught Exception in %s on line %d: oh noes]
>00008: throw new \Exception("oh noes");
00009: ?>
00010:
prompt> exception caught
[Script ended normally]
prompt>