Skip to content

Commit 2ab94b1

Browse files
committed
Fixed a mistake that ce->ce_flags was mistakenly written as ce->type.
1 parent 1945258 commit 2ab94b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_inheritance.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,13 +1668,13 @@ static void do_inherit_trait_or_interface_constant(zend_string *name, zend_class
16681668
ct = pemalloc(sizeof(zend_class_constant), 1);
16691669
memcpy(ct, c, sizeof(zend_class_constant));
16701670
c = ct;
1671-
} else if (trait_or_interface->type & ZEND_ACC_TRAIT) {
1671+
} else if (trait_or_interface->ce_flags & ZEND_ACC_TRAIT) {
16721672
ct = emalloc(sizeof(zend_class_constant));
16731673
memcpy(ct, c, sizeof(zend_class_constant));
16741674
c = ct;
16751675
}
16761676

1677-
if (trait_or_interface->type & ZEND_ACC_TRAIT) {
1677+
if (trait_or_interface->ce_flags & ZEND_ACC_TRAIT) {
16781678
c->ce = ce;
16791679
Z_TRY_ADDREF(c->value);
16801680
c->doc_comment = c->doc_comment ? zend_string_copy(c->doc_comment) : NULL;

0 commit comments

Comments
 (0)