Skip to content

Commit dd8cb28

Browse files
committed
Move the num_interfaces mutation to a safer place
1 parent f7e4ac0 commit dd8cb28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_inheritance.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3538,7 +3538,6 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
35383538
}
35393539
}
35403540
}
3541-
ce->num_interfaces = num_implementable_interfaces;
35423541

35433542
#ifndef ZEND_WIN32
35443543
if (ce->ce_flags & ZEND_ACC_ENUM) {
@@ -3584,6 +3583,8 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
35843583
Z_CE_P(zv) = ce;
35853584
}
35863585

3586+
ce->num_interfaces = num_implementable_interfaces;
3587+
35873588
if (CG(unlinked_uses)) {
35883589
zend_hash_index_del(CG(unlinked_uses), (zend_long)(uintptr_t) ce);
35893590
}

0 commit comments

Comments
 (0)