Skip to content

Commit cd2506f

Browse files
committed
Fix constant inheritance check
1 parent 22244d1 commit cd2506f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ static bool do_inherit_constant_check(
16481648
);
16491649
}
16501650

1651-
if (old_constant->ce != parent_constant->ce && (old_constant->ce->ce_flags & ZEND_ACC_INTERFACE)) {
1651+
if (old_constant->ce != parent_constant->ce && old_constant->ce != ce) {
16521652
zend_error_noreturn(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s::%s from interface %s", ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(iface->name));
16531653
}
16541654

0 commit comments

Comments
 (0)