summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schl├╝ter <johannes@schlueters.de>2012-04-05 16:46:52 (GMT)
committerStanislav Malyshev <stas@php.net>2012-04-12 02:21:41 (GMT)
commit82c05eeda99e646063abece28c2b1a7c0a414338 (patch)
tree4584d7540ac4dbd89ca7fd3c05cb812e7c1bde32
parent05c8d4766c272e101b5279f0ec432e1b16e74637 (diff)
downloadphp-82c05eeda99e646063abece28c2b1a7c0a414338.tar.gz
Copy default properties of internal classes for different threads
-rw-r--r--Zend/zend_API.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 71feccf..98a33e5 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1093,7 +1093,12 @@ ZEND_API void object_properties_init(zend_object *object, zend_class_entry *clas
for (i = 0; i < class_type->default_properties_count; i++) {
object->properties_table[i] = class_type->default_properties_table[i];
if (class_type->default_properties_table[i]) {
+#if ZTS
+ ALLOC_ZVAL( object->properties_table[i]);
+ MAKE_COPY_ZVAL(&class_type->default_properties_table[i], object->properties_table[i]);
+#else
Z_ADDREF_P(object->properties_table[i]);
+#endif
}
}
object->properties = NULL;