Skip to content

Commit 4736c5e

Browse files
committed
Fixed a mistake that ce->ce_flags was mistakenly written as ce->type.
1 parent 4f82ed0 commit 4736c5e

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
@@ -1737,13 +1737,13 @@ static void do_inherit_trait_or_interface_constant(zend_string *name, zend_class
17371737
ct = pemalloc(sizeof(zend_class_constant), 1);
17381738
memcpy(ct, c, sizeof(zend_class_constant));
17391739
c = ct;
1740-
} else if (trait_or_interface->type & ZEND_ACC_TRAIT) {
1740+
} else if (trait_or_interface->ce_flags & ZEND_ACC_TRAIT) {
17411741
ct = emalloc(sizeof(zend_class_constant));
17421742
memcpy(ct, c, sizeof(zend_class_constant));
17431743
c = ct;
17441744
}
17451745

1746-
if (trait_or_interface->type & ZEND_ACC_TRAIT) {
1746+
if (trait_or_interface->ce_flags & ZEND_ACC_TRAIT) {
17471747
c->ce = ce;
17481748
Z_TRY_ADDREF(c->value);
17491749
c->doc_comment = c->doc_comment ? zend_string_copy(c->doc_comment) : NULL;

0 commit comments

Comments
 (0)