We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c6d6f4 commit cb26637Copy full SHA for cb26637
1 file changed
Zend/zend_inheritance.c
@@ -2125,7 +2125,9 @@ static bool do_inherit_constant_check(
2125
}
2126
2127
if (!(ZEND_CLASS_CONST_FLAGS(parent_constant) & ZEND_ACC_PRIVATE)) {
2128
- ZEND_CLASS_CONST_FLAGS(child_constant) &= ~ZEND_ACC_OVERRIDE;
+ if (child_constant->ce == ce) {
2129
+ ZEND_CLASS_CONST_FLAGS(child_constant) &= ~ZEND_ACC_OVERRIDE;
2130
+ }
2131
2132
2133
if (!(ZEND_CLASS_CONST_FLAGS(parent_constant) & ZEND_ACC_PRIVATE) && ZEND_TYPE_IS_SET(parent_constant->type)) {
0 commit comments