X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_property_proxy.c;h=781c0c0ccc5c60e67ed8d579bc93d7406b46efbd;hp=f4d352300cee50da02405c5ece530d0f3f568600;hb=305ac2f007710b684d96b05f33964b4f6a4e3e4d;hpb=5913db177b07398233cb00d2357aba595eab8371 diff --git a/php_http_property_proxy.c b/php_http_property_proxy.c index f4d3523..781c0c0 100644 --- a/php_http_property_proxy.c +++ b/php_http_property_proxy.c @@ -91,7 +91,11 @@ zend_object_value php_http_property_proxy_object_new_ex(zend_class_entry *ce, ph o = ecalloc(1, sizeof(*o)); zend_object_std_init((zend_object *) o, ce TSRMLS_CC); +#if PHP_VERSION_ID < 50339 + zend_hash_copy(((zend_object *) o)->properties, &(ce->default_properties), (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*)); +#else object_properties_init((zend_object *) o, ce); +#endif if (ptr) { *ptr = o;