fixes for windows and 5.3 compatibility
[m6w6/ext-http] / php_http_object.c
index c278e6bc08b9b75c700b198bf386173154ffcf49..f85960f6acbb3cc3979f2e4a121313d1ac763642 100644 (file)
@@ -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;