Skip to content

Commit 60dca22

Browse files
committed
Initialize static_members_table
1 parent 2f51764 commit 60dca22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Zend/zend_API.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,12 @@ ZEND_API int zend_update_class_constants(zend_class_entry *class_type) /* {{{ */
11981198
}
11991199
} ZEND_HASH_FOREACH_END();
12001200

1201+
if (class_type->default_static_members_count && !CE_STATIC_MEMBERS(class_type)) {
1202+
if (class_type->type == ZEND_INTERNAL_CLASS || (class_type->ce_flags & (ZEND_ACC_IMMUTABLE|ZEND_ACC_PRELOADED))) {
1203+
zend_class_init_statics(class_type);
1204+
}
1205+
}
1206+
12011207
ce = class_type;
12021208
while (ce) {
12031209
ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) {

0 commit comments

Comments
 (0)