fixes for windows and 5.3 compatibility
[m6w6/ext-http] / php_http_encoding.c
index 4a71c80074d24f1ea902a641df09810c13653312..c84c30981277d7f478a83e2330da97a88dfb555b 100644 (file)
@@ -959,7 +959,11 @@ zend_object_value php_http_encoding_stream_object_new_ex(zend_class_entry *ce, p
 
        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;