From 984560f93d56d2c39943e19a3ae403bf2000f899 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Thu, 12 Aug 2010 17:27:16 +0000 Subject: separate properties of internal classes in ZTS mode fully, otherwise multiple threads will modify the zvals' contents without any synchronisation. --- Zend/zend_API.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_API.c') diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c01f9e653d..163c19bbfc 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -952,7 +952,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); -- cgit v1.2.1