@@ -2655,6 +2655,13 @@ static ZEND_COLD zend_long _zend_jit_throw_dec_prop_error(zend_property_info *pr
26552655
26562656static void ZEND_FASTCALL zend_jit_inc_typed_prop (zval * var_ptr , zend_property_info * prop_info )
26572657{
2658+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2659+
2660+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2661+ zend_readonly_property_modification_error (prop_info );
2662+ return ;
2663+ }
2664+
26582665 zend_execute_data * execute_data = EG (current_execute_data );
26592666 zval tmp ;
26602667
@@ -2678,6 +2685,13 @@ static void ZEND_FASTCALL zend_jit_inc_typed_prop(zval *var_ptr, zend_property_i
26782685
26792686static void ZEND_FASTCALL zend_jit_dec_typed_prop (zval * var_ptr , zend_property_info * prop_info )
26802687{
2688+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2689+
2690+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2691+ zend_readonly_property_modification_error (prop_info );
2692+ return ;
2693+ }
2694+
26812695 zend_execute_data * execute_data = EG (current_execute_data );
26822696 zval tmp ;
26832697
@@ -2715,6 +2729,16 @@ static void ZEND_FASTCALL zend_jit_pre_dec_typed_prop(zval *var_ptr, zend_proper
27152729
27162730static void ZEND_FASTCALL zend_jit_post_inc_typed_prop (zval * var_ptr , zend_property_info * prop_info , zval * result )
27172731{
2732+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2733+
2734+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2735+ zend_readonly_property_modification_error (prop_info );
2736+ if (result ) {
2737+ ZVAL_UNDEF (result );
2738+ }
2739+ return ;
2740+ }
2741+
27182742 zend_execute_data * execute_data = EG (current_execute_data );
27192743
27202744 ZVAL_DEREF (var_ptr );
@@ -2736,6 +2760,16 @@ static void ZEND_FASTCALL zend_jit_post_inc_typed_prop(zval *var_ptr, zend_prope
27362760
27372761static void ZEND_FASTCALL zend_jit_post_dec_typed_prop (zval * var_ptr , zend_property_info * prop_info , zval * result )
27382762{
2763+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2764+
2765+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2766+ zend_readonly_property_modification_error (prop_info );
2767+ if (result ) {
2768+ ZVAL_UNDEF (result );
2769+ }
2770+ return ;
2771+ }
2772+
27392773 zend_execute_data * execute_data = EG (current_execute_data );
27402774
27412775 ZVAL_DEREF (var_ptr );
0 commit comments