Skip to content

Commit 6e91a82

Browse files
committed
Fix mutable data initialization during lazy class loading
1 parent 9fe3aab commit 6e91a82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_inheritance.c

+5
Original file line numberDiff line numberDiff line change
@@ -2593,6 +2593,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
25932593
ce->ce_flags &= ~ZEND_ACC_IMMUTABLE;
25942594
ce->refcount = 1;
25952595
ce->inheritance_cache = NULL;
2596+
if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) {
2597+
ZEND_MAP_PTR_NEW(ce->mutable_data);
2598+
} else {
2599+
ZEND_MAP_PTR_INIT(ce->mutable_data, NULL);
2600+
}
25962601

25972602
/* properties */
25982603
if (ce->default_properties_table) {

0 commit comments

Comments
 (0)