We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b7f83 commit 5faee30Copy full SHA for 5faee30
Zend/zend_inheritance.c
@@ -1136,7 +1136,9 @@ static inheritance_status do_inheritance_check_on_method(
1136
#define SEPARATE_METHOD() do { \
1137
if ((flags & ZEND_INHERITANCE_LAZY_CHILD_CLONE) \
1138
&& child_scope != ce \
1139
- /* Trait scopes are fixed after inheritance. However, they are always duplicated. */ \
+ /* Trait methods have already been separated at this point. However, their */ \
1140
+ /* scope isn't fixed until after inheritance checks to preserve the scope */ \
1141
+ /* in error messages. Skip them here explicitly. */ \
1142
&& !(child_scope->ce_flags & ZEND_ACC_TRAIT) \
1143
&& child->type == ZEND_USER_FUNCTION) { \
1144
/* op_array wasn't duplicated yet */ \
0 commit comments