Skip to content

Commit 4ed9176

Browse files
committed
Move the num_interfaces mutation to a safer place
1 parent a0fe072 commit 4ed9176

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
@@ -3552,7 +3552,6 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
35523552
}
35533553
}
35543554
}
3555-
ce->num_interfaces = num_implementable_interfaces;
35563555

35573556
#ifndef ZEND_WIN32
35583557
if (ce->ce_flags & ZEND_ACC_ENUM) {
@@ -3598,6 +3597,8 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
35983597
Z_CE_P(zv) = ce;
35993598
}
36003599

3600+
ce->num_interfaces = num_implementable_interfaces;
3601+
36013602
if (CG(unlinked_uses)) {
36023603
zend_hash_index_del(CG(unlinked_uses), (zend_long)(uintptr_t) ce);
36033604
}

0 commit comments

Comments
 (0)