Skip to content

Commit 2a3eaf6

Browse files
committed
Use zend_clear_exception(à API
1 parent 34a6a55 commit 2a3eaf6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7419,8 +7419,7 @@ ZEND_VM_HANDLER(203, ZEND_SILENCE_CATCH, ANY, ANY)
74197419
DTRACE_EXCEPTION_CAUGHT((char *)EG(exception)->ce->name);
74207420
}
74217421
#endif /* HAVE_DTRACE */
7422-
OBJ_RELEASE(EG(exception));
7423-
EG(exception) = NULL;
7422+
zend_clear_exception();
74247423

74257424
/* Free object (needed to not leak memory on @new) */
74267425
if (Z_TYPE_P(EX_VAR(opline->result.var)) == IS_OBJECT) {

Zend/zend_vm_execute.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,8 +2922,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SILENCE_CATCH_SPEC_HANDLER(ZEN
29222922
DTRACE_EXCEPTION_CAUGHT((char *)EG(exception)->ce->name);
29232923
}
29242924
#endif /* HAVE_DTRACE */
2925-
OBJ_RELEASE(EG(exception));
2926-
EG(exception) = NULL;
2925+
zend_clear_exception();
29272926

29282927
/* Free object (needed to not leak memory on @new) */
29292928
if (Z_TYPE_P(EX_VAR(opline->result.var)) == IS_OBJECT) {

0 commit comments

Comments
 (0)