Skip to content

Commit ea3e0d5

Browse files
johannessmalyshev
authored andcommitted
Copy default properties of internal classes for different threads
1 parent 7495c5e commit ea3e0d5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_API.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,12 @@ ZEND_API void object_properties_init(zend_object *object, zend_class_entry *clas
10931093
for (i = 0; i < class_type->default_properties_count; i++) {
10941094
object->properties_table[i] = class_type->default_properties_table[i];
10951095
if (class_type->default_properties_table[i]) {
1096+
#if ZTS
1097+
ALLOC_ZVAL( object->properties_table[i]);
1098+
MAKE_COPY_ZVAL(&class_type->default_properties_table[i], object->properties_table[i]);
1099+
#else
10961100
Z_ADDREF_P(object->properties_table[i]);
1101+
#endif
10971102
}
10981103
}
10991104
object->properties = NULL;

0 commit comments

Comments
 (0)