@@ -2650,6 +2650,13 @@ static ZEND_COLD zend_long _zend_jit_throw_dec_prop_error(zend_property_info *pr
26502650
26512651static void ZEND_FASTCALL zend_jit_inc_typed_prop (zval * var_ptr , zend_property_info * prop_info )
26522652{
2653+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2654+
2655+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2656+ zend_readonly_property_modification_error (prop_info );
2657+ return ;
2658+ }
2659+
26532660 zend_execute_data * execute_data = EG (current_execute_data );
26542661 zval tmp ;
26552662
@@ -2673,6 +2680,13 @@ static void ZEND_FASTCALL zend_jit_inc_typed_prop(zval *var_ptr, zend_property_i
26732680
26742681static void ZEND_FASTCALL zend_jit_dec_typed_prop (zval * var_ptr , zend_property_info * prop_info )
26752682{
2683+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2684+
2685+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2686+ zend_readonly_property_modification_error (prop_info );
2687+ return ;
2688+ }
2689+
26762690 zend_execute_data * execute_data = EG (current_execute_data );
26772691 zval tmp ;
26782692
@@ -2710,6 +2724,16 @@ static void ZEND_FASTCALL zend_jit_pre_dec_typed_prop(zval *var_ptr, zend_proper
27102724
27112725static void ZEND_FASTCALL zend_jit_post_inc_typed_prop (zval * var_ptr , zend_property_info * prop_info , zval * result )
27122726{
2727+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2728+
2729+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2730+ zend_readonly_property_modification_error (prop_info );
2731+ if (result ) {
2732+ ZVAL_UNDEF (result );
2733+ }
2734+ return ;
2735+ }
2736+
27132737 zend_execute_data * execute_data = EG (current_execute_data );
27142738
27152739 ZVAL_DEREF (var_ptr );
@@ -2731,6 +2755,16 @@ static void ZEND_FASTCALL zend_jit_post_inc_typed_prop(zval *var_ptr, zend_prope
27312755
27322756static void ZEND_FASTCALL zend_jit_post_dec_typed_prop (zval * var_ptr , zend_property_info * prop_info , zval * result )
27332757{
2758+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2759+
2760+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2761+ zend_readonly_property_modification_error (prop_info );
2762+ if (result ) {
2763+ ZVAL_UNDEF (result );
2764+ }
2765+ return ;
2766+ }
2767+
27342768 zend_execute_data * execute_data = EG (current_execute_data );
27352769
27362770 ZVAL_DEREF (var_ptr );
0 commit comments