Skip to content

Commit bc60d85

Browse files
committed
zend_inheritance: Clean up scoping in zend_inheritance_check_override()
1 parent ecba43a commit bc60d85

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Zend/zend_inheritance.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,14 +2317,11 @@ static void zend_do_implement_interfaces(zend_class_entry *ce, zend_class_entry
23172317

23182318
void zend_inheritance_check_override(const zend_class_entry *ce)
23192319
{
2320-
zend_function *f;
2321-
zend_property_info *prop;
2322-
23232320
if (ce->ce_flags & ZEND_ACC_TRAIT) {
23242321
return;
23252322
}
23262323

2327-
ZEND_HASH_MAP_FOREACH_PTR(&ce->function_table, f) {
2324+
ZEND_HASH_MAP_FOREACH_PTR(&ce->function_table, zend_function *f) {
23282325
if (f->common.fn_flags & ZEND_ACC_OVERRIDE) {
23292326
ZEND_ASSERT(f->type != ZEND_INTERNAL_FUNCTION);
23302327

@@ -2335,7 +2332,7 @@ void zend_inheritance_check_override(const zend_class_entry *ce)
23352332
}
23362333
} ZEND_HASH_FOREACH_END();
23372334

2338-
ZEND_HASH_MAP_FOREACH_PTR(&ce->properties_info, prop) {
2335+
ZEND_HASH_MAP_FOREACH_PTR(&ce->properties_info, zend_property_info *prop) {
23392336
if (prop->flags & ZEND_ACC_OVERRIDE) {
23402337
zend_error_noreturn(
23412338
E_COMPILE_ERROR,
@@ -2345,7 +2342,7 @@ void zend_inheritance_check_override(const zend_class_entry *ce)
23452342

23462343
if (prop->hooks) {
23472344
for (uint32_t i = 0; i < ZEND_PROPERTY_HOOK_COUNT; i++) {
2348-
f = prop->hooks[i];
2345+
zend_function *f = prop->hooks[i];
23492346
if (f && f->common.fn_flags & ZEND_ACC_OVERRIDE) {
23502347
ZEND_ASSERT(f->type != ZEND_INTERNAL_FUNCTION);
23512348

0 commit comments

Comments
 (0)