fixes for windows and 5.3 compatibility
[m6w6/ext-http] / php_http_cookie.c
index 6908d386247e4b09de79af5b3e4618beb8887ffe..5b78abbe0dd161d9595839f14d88bbff065b47f8 100644 (file)
@@ -463,7 +463,11 @@ zend_object_value php_http_cookie_object_new_ex(zend_class_entry *ce, php_http_c
 
        o = ecalloc(sizeof(*o), 1);
        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 (list) {
                o->list = list;