summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2010-08-12 07:58:14 +0000
committerSascha Schumann <sas@php.net>2010-08-12 07:58:14 +0000
commit50a0ea7b8cede077220902733bd4efec59bf41d8 (patch)
tree4dedea7880a9e871946d268e4d2b1a5714d8bad9 /Zend/zend_API.c
parent49f22527cc57f49d6b3b6bbd312715eaee878990 (diff)
downloadphp-git-50a0ea7b8cede077220902733bd4efec59bf41d8.tar.gz
separate properties of internal classes in ZTS mode fully,
otherwise multiple threads will modify the zvals' contents without any synchronisation.
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index f8ce293210..c8707adb6c 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1082,7 +1082,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
} else {
ALLOC_HASHTABLE_REL(object->properties);
zend_hash_init(object->properties, zend_hash_num_elements(&class_type->default_properties), NULL, ZVAL_PTR_DTOR, 0);
- zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
}
} else {
Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC);