Skip to content

Commit 700f189

Browse files
committed
Use zend_clear_exception(à API
1 parent 7a324bd commit 700f189

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
@@ -7378,8 +7378,7 @@ ZEND_VM_HANDLER(202, ZEND_SILENCE_CATCH, ANY, ANY)
73787378
DTRACE_EXCEPTION_CAUGHT((char *)EG(exception)->ce->name);
73797379
}
73807380
#endif /* HAVE_DTRACE */
7381-
OBJ_RELEASE(EG(exception));
7382-
EG(exception) = NULL;
7381+
zend_clear_exception();
73837382

73847383
/* Free object (needed to not leak memory on @new) */
73857384
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
@@ -2900,8 +2900,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SILENCE_CATCH_SPEC_HANDLER(ZEN
29002900
DTRACE_EXCEPTION_CAUGHT((char *)EG(exception)->ce->name);
29012901
}
29022902
#endif /* HAVE_DTRACE */
2903-
OBJ_RELEASE(EG(exception));
2904-
EG(exception) = NULL;
2903+
zend_clear_exception();
29052904

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

0 commit comments

Comments
 (0)