@@ -673,6 +673,8 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di
673
673
zend_ulong hval ;
674
674
zend_string * offset_key ;
675
675
zval * retval ;
676
+ zend_execute_data * execute_data ;
677
+ const zend_op * opline ;
676
678
677
679
if (Z_TYPE_P (dim ) == IS_REFERENCE ) {
678
680
dim = Z_REFVAL_P (dim );
@@ -686,9 +688,15 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_rw_helper(zend_array *ht, zval *di
686
688
offset_key = Z_STR_P (dim );
687
689
goto str_index ;
688
690
case IS_UNDEF :
689
- if (!zend_jit_undefined_op_helper_write (ht , EG (current_execute_data )-> opline -> op2 .var )) {
690
- if (EG (exception )) {
691
- undef_result_after_exception ();
691
+ execute_data = EG (current_execute_data );
692
+ opline = EX (opline );
693
+ if (!zend_jit_undefined_op_helper_write (ht , opline -> op2 .var )) {
694
+ if (opline -> result_type & (IS_VAR | IS_TMP_VAR )) {
695
+ if (EG (exception )) {
696
+ ZVAL_UNDEF (EX_VAR (opline -> result .var ));
697
+ } else {
698
+ ZVAL_NULL (EX_VAR (opline -> result .var ));
699
+ }
692
700
}
693
701
return NULL ;
694
702
}
@@ -760,6 +768,8 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
760
768
zend_ulong hval ;
761
769
zend_string * offset_key ;
762
770
zval * retval ;
771
+ zend_execute_data * execute_data ;
772
+ const zend_op * opline ;
763
773
764
774
if (Z_TYPE_P (dim ) == IS_REFERENCE ) {
765
775
dim = Z_REFVAL_P (dim );
@@ -773,9 +783,15 @@ static zval* ZEND_FASTCALL zend_jit_fetch_dim_w_helper(zend_array *ht, zval *dim
773
783
offset_key = Z_STR_P (dim );
774
784
goto str_index ;
775
785
case IS_UNDEF :
776
- if (!zend_jit_undefined_op_helper_write (ht , EG (current_execute_data )-> opline -> op2 .var )) {
777
- if (EG (exception )) {
778
- undef_result_after_exception ();
786
+ execute_data = EG (current_execute_data );
787
+ opline = EX (opline );
788
+ if (!zend_jit_undefined_op_helper_write (ht , opline -> op2 .var )) {
789
+ if (opline -> result_type & (IS_VAR | IS_TMP_VAR )) {
790
+ if (EG (exception )) {
791
+ ZVAL_UNDEF (EX_VAR (opline -> result .var ));
792
+ } else {
793
+ ZVAL_NULL (EX_VAR (opline -> result .var ));
794
+ }
779
795
}
780
796
return NULL ;
781
797
}
0 commit comments