@@ -1328,9 +1328,9 @@ static inheritance_status verify_property_type_compatibility(
13281328 if (parent_info -> hooks [ZEND_PROPERTY_HOOK_SET ]
13291329 && (!child_info -> hooks || !child_info -> hooks [ZEND_PROPERTY_HOOK_SET ])) {
13301330 zend_type set_type = parent_info -> hooks [ZEND_PROPERTY_HOOK_SET ]-> common .arg_info [0 ].type ;
1331- inheritance_status result = zend_perform_covariant_type_check (
1331+ inheritance_status hook_result = zend_perform_covariant_type_check (
13321332 parent_info -> ce , set_type , child_info -> ce , child_info -> type );
1333- if ((result == INHERITANCE_ERROR && throw_on_error ) || (result == INHERITANCE_UNRESOLVED && throw_on_unresolved )) {
1333+ if ((hook_result == INHERITANCE_ERROR && throw_on_error ) || (hook_result == INHERITANCE_UNRESOLVED && throw_on_unresolved )) {
13341334 emit_set_hook_type_error (child_info , parent_info );
13351335 }
13361336 }
@@ -2900,9 +2900,9 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
29002900 zend_function * * hooks = new_prop -> hooks =
29012901 zend_arena_alloc (& CG (arena ), ZEND_PROPERTY_HOOK_STRUCT_SIZE );
29022902 memcpy (hooks , property_info -> hooks , ZEND_PROPERTY_HOOK_STRUCT_SIZE );
2903- for (uint32_t i = 0 ; i < ZEND_PROPERTY_HOOK_COUNT ; i ++ ) {
2904- if (hooks [i ]) {
2905- zend_function * old_fn = hooks [i ];
2903+ for (uint32_t hook_index = 0 ; hook_index < ZEND_PROPERTY_HOOK_COUNT ; hook_index ++ ) {
2904+ if (hooks [hook_index ]) {
2905+ const zend_function * old_fn = hooks [hook_index ];
29062906
29072907 /* Hooks are not yet supported for internal properties. */
29082908 ZEND_ASSERT (ZEND_USER_CODE (old_fn -> type ));
@@ -2917,7 +2917,7 @@ static void zend_do_traits_property_binding(zend_class_entry *ce, zend_class_ent
29172917
29182918 zend_fixup_trait_method (new_fn , ce );
29192919
2920- hooks [i ] = new_fn ;
2920+ hooks [hook_index ] = new_fn ;
29212921 }
29222922 }
29232923 ce -> ce_flags |= ZEND_ACC_USE_GUARDS ;
0 commit comments