We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 218fd03 commit 2c57b05Copy full SHA for 2c57b05
Zend/zend_exceptions.c
@@ -175,6 +175,12 @@ ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /*
175
176
if (exception != NULL) {
177
zend_object *previous = EG(exception);
178
+ if (previous && (zend_is_unwind_exit(previous) || zend_is_graceful_exit(previous))) {
179
+ /* Don't replace unwinding exception with different exception. */
180
+ OBJ_RELEASE(exception);
181
+ return;
182
+ }
183
+
184
zend_exception_set_previous(exception, EG(exception));
185
EG(exception) = exception;
186
if (previous) {
0 commit comments