Skip to content

Commit b88c678

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Check exception before using undef_result_after_exception()
2 parents fdcacc7 + 0391c55 commit b88c678

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di
581581
goto str_index;
582582
case IS_UNDEF:
583583
if (!zend_jit_undefined_op_helper_write(ht, EG(current_execute_data)->opline->op2.var)) {
584-
undef_result_after_exception();
584+
if (EG(exception)) {
585+
undef_result_after_exception();
586+
}
585587
return NULL;
586588
}
587589
ZEND_FALLTHROUGH;
@@ -645,7 +647,9 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
645647
goto str_index;
646648
case IS_UNDEF:
647649
if (!zend_jit_undefined_op_helper_write(ht, EG(current_execute_data)->opline->op2.var)) {
648-
undef_result_after_exception();
650+
if (EG(exception)) {
651+
undef_result_after_exception();
652+
}
649653
return NULL;
650654
}
651655
ZEND_FALLTHROUGH;

0 commit comments

Comments
 (0)