Skip to content

Commit 2821ee4

Browse files
committed
Use zend_clear_exception(à API
1 parent d8b53a0 commit 2821ee4

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
@@ -7344,8 +7344,7 @@ ZEND_VM_HANDLER(201, ZEND_SILENCE_CATCH, ANY, ANY)
73447344
DTRACE_EXCEPTION_CAUGHT((char *)EG(exception)->ce->name);
73457345
}
73467346
#endif /* HAVE_DTRACE */
7347-
OBJ_RELEASE(EG(exception));
7348-
EG(exception) = NULL;
7347+
zend_clear_exception();
73497348

73507349
/* Free object (needed to not leak memory on @new) */
73517350
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
@@ -2782,8 +2782,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SILENCE_CATCH_SPEC_HANDLER(ZEN
27822782
DTRACE_EXCEPTION_CAUGHT((char *)EG(exception)->ce->name);
27832783
}
27842784
#endif /* HAVE_DTRACE */
2785-
OBJ_RELEASE(EG(exception));
2786-
EG(exception) = NULL;
2785+
zend_clear_exception();
27872786

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

0 commit comments

Comments
 (0)