summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2012-04-12 02:24:11 (GMT)
committerStanislav Malyshev <stas@php.net>2012-04-12 02:24:11 (GMT)
commit363797e9affc7d07ddb2e04940cb1ed92a9d1124 (patch)
tree4f9e67d8b3286f3bf1d09513d76652b6b4f087cd
parent8bf79f7b7fbd879dc1e91ff35095bdec24564b7b (diff)
parent82c05eeda99e646063abece28c2b1a7c0a414338 (diff)
downloadphp-363797e9affc7d07ddb2e04940cb1ed92a9d1124.tar.gz
Merge branch 'PHP-5.4'
* PHP-5.4: 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;