Skip to content

Commit 1c9be13

Browse files
committed
Rename old_constant to existing_constant
1 parent 15ffed3 commit 1c9be13

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Zend/zend_inheritance.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,15 +2231,15 @@ static bool do_trait_constant_check(zend_class_entry *ce, zend_class_constant *t
22312231
return true;
22322232
}
22332233

2234-
zend_class_constant *old_constant = Z_PTR_P(zv);
2234+
zend_class_constant *existing_constant = Z_PTR_P(zv);
22352235

2236-
if ((ZEND_CLASS_CONST_FLAGS(trait_constant) & flags_mask) == (ZEND_CLASS_CONST_FLAGS(old_constant) & flags_mask)) {
2237-
is_compatible = check_trait_property_or_constant_value_compatibility(ce, &trait_constant->value, &old_constant->value);
2236+
if ((ZEND_CLASS_CONST_FLAGS(trait_constant) & flags_mask) == (ZEND_CLASS_CONST_FLAGS(existing_constant) & flags_mask)) {
2237+
is_compatible = check_trait_property_or_constant_value_compatibility(ce, &trait_constant->value, &existing_constant->value);
22382238
}
22392239
if (!is_compatible) {
22402240
zend_error_noreturn(E_COMPILE_ERROR,
22412241
"%s and %s define the same constant (%s) in the composition of %s. However, the definition differs and is considered incompatible. Class was composed",
2242-
ZSTR_VAL(find_first_constant_definition(ce, traits, current_trait, name, old_constant->ce)->name),
2242+
ZSTR_VAL(find_first_constant_definition(ce, traits, current_trait, name, existing_constant->ce)->name),
22432243
ZSTR_VAL(trait_constant->ce->name),
22442244
ZSTR_VAL(name),
22452245
ZSTR_VAL(ce->name));

0 commit comments

Comments
 (0)