@@ -2662,6 +2662,13 @@ static ZEND_COLD zend_long _zend_jit_throw_dec_prop_error(zend_property_info *pr
26622662
26632663static void ZEND_FASTCALL zend_jit_inc_typed_prop (zval * var_ptr , zend_property_info * prop_info )
26642664{
2665+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2666+
2667+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2668+ zend_readonly_property_modification_error (prop_info );
2669+ return ;
2670+ }
2671+
26652672 zend_execute_data * execute_data = EG (current_execute_data );
26662673 zval tmp ;
26672674
@@ -2685,6 +2692,13 @@ static void ZEND_FASTCALL zend_jit_inc_typed_prop(zval *var_ptr, zend_property_i
26852692
26862693static void ZEND_FASTCALL zend_jit_dec_typed_prop (zval * var_ptr , zend_property_info * prop_info )
26872694{
2695+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2696+
2697+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2698+ zend_readonly_property_modification_error (prop_info );
2699+ return ;
2700+ }
2701+
26882702 zend_execute_data * execute_data = EG (current_execute_data );
26892703 zval tmp ;
26902704
@@ -2722,6 +2736,16 @@ static void ZEND_FASTCALL zend_jit_pre_dec_typed_prop(zval *var_ptr, zend_proper
27222736
27232737static void ZEND_FASTCALL zend_jit_post_inc_typed_prop (zval * var_ptr , zend_property_info * prop_info , zval * result )
27242738{
2739+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2740+
2741+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2742+ zend_readonly_property_modification_error (prop_info );
2743+ if (result ) {
2744+ ZVAL_UNDEF (result );
2745+ }
2746+ return ;
2747+ }
2748+
27252749 zend_execute_data * execute_data = EG (current_execute_data );
27262750
27272751 ZVAL_DEREF (var_ptr );
@@ -2743,6 +2767,16 @@ static void ZEND_FASTCALL zend_jit_post_inc_typed_prop(zval *var_ptr, zend_prope
27432767
27442768static void ZEND_FASTCALL zend_jit_post_dec_typed_prop (zval * var_ptr , zend_property_info * prop_info , zval * result )
27452769{
2770+ ZEND_ASSERT (Z_TYPE_P (var_ptr ) != IS_UNDEF );
2771+
2772+ if (UNEXPECTED ((prop_info -> flags & ZEND_ACC_READONLY ))) {
2773+ zend_readonly_property_modification_error (prop_info );
2774+ if (result ) {
2775+ ZVAL_UNDEF (result );
2776+ }
2777+ return ;
2778+ }
2779+
27462780 zend_execute_data * execute_data = EG (current_execute_data );
27472781
27482782 ZVAL_DEREF (var_ptr );
0 commit comments