Commit:    ea3e0d5a7370df63af9372780b91a749fda773b1
Author:    Johannes Schl├╝ter <johan...@schlueters.de>         Thu, 5 Apr 2012 
18:46:52 +0200
Committer: Stanislav Malyshev <s...@php.net>      Wed, 11 Apr 2012 20:21:59 
-0700
Parents:   7495c5e1d404d251d8c9c521fd80c85cd4e2fad1
Branches:  PHP-5.4.1

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=ea3e0d5a7370df63af9372780b91a749fda773b1

Log:
Copy default properties of internal classes for different threads

Changed paths:
  M  Zend/zend_API.c


Diff:
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;


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to