X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_object.c;h=f85960f6acbb3cc3979f2e4a121313d1ac763642;hb=287edcbfb698ff402588f7057dae0bc994d6e8e4;hp=c278e6bc08b9b75c700b198bf386173154ffcf49;hpb=bd80b17b026a00a254ee8693cd7bacf1ebdec4cf;p=m6w6%2Fext-http diff --git a/php_http_object.c b/php_http_object.c index c278e6b..f85960f 100644 --- a/php_http_object.c +++ b/php_http_object.c @@ -98,7 +98,11 @@ zend_object_value php_http_object_new_ex(zend_class_entry *ce, void *nothing, ph o = ecalloc(1, sizeof(php_http_object_t)); 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;