oh dammit
[m6w6/ext-http] / http_request_object.c
index 3244161e2bd6e6556c24a287f409a1f4f8d8aaae..c3efaa904fe9282d2d3072ff18559974fe900e5f 100644 (file)
@@ -222,6 +222,8 @@ HTTP_END_ARGS;
 
 #define http_request_object_declare_default_properties() _http_request_object_declare_default_properties(TSRMLS_C)
 static inline void _http_request_object_declare_default_properties(TSRMLS_D);
+#define http_request_object_clone_obj _http_request_object_clone_obj
+static inline zend_object_value _http_request_object_clone_obj(zval *object TSRMLS_DC);
 
 zend_class_entry *http_request_object_ce;
 zend_function_entry http_request_object_fe[] = {
@@ -301,6 +303,7 @@ static zend_object_handlers http_request_object_handlers;
 PHP_MINIT_FUNCTION(http_request_object)
 {
        HTTP_REGISTER_CLASS_EX(HttpRequest, http_request_object, NULL, 0);
+       http_request_object_handlers.clone_obj = NULL;
        return SUCCESS;
 }
 
@@ -726,7 +729,7 @@ PHP_METHOD(HttpRequest, setOptions)
        zval *opts = NULL, *old_opts, **opt;
        getObject(http_request_object, obj);
 
-       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a/!", &opts)) {
+       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a!", &opts)) {
                RETURN_FALSE;
        }
        
@@ -743,7 +746,7 @@ PHP_METHOD(HttpRequest, setOptions)
                        if (!strcmp(key, "headers")) {
                                zval **headers;
                                if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "headers", sizeof("headers"), (void **) &headers)) {
-                                       convert_to_array(*opt);
+                                       convert_to_array_ex(opt);
                                        convert_to_array(*headers);
                                        array_merge(*opt, *headers);
                                        continue;
@@ -751,7 +754,7 @@ PHP_METHOD(HttpRequest, setOptions)
                        } else if (!strcmp(key, "cookies")) {
                                zval **cookies;
                                if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "cookies", sizeof("cookies"), (void **) &cookies)) {
-                                       convert_to_array(*opt);
+                                       convert_to_array_ex(opt);
                                        convert_to_array(*cookies);
                                        array_merge(*opt, *cookies);
                                        continue;
@@ -759,7 +762,7 @@ PHP_METHOD(HttpRequest, setOptions)
                        } else if (!strcmp(key, "ssl")) {
                                zval **ssl;
                                if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "ssl", sizeof("ssl"), (void **) &ssl)) {
-                                       convert_to_array(*opt);
+                                       convert_to_array_ex(opt);
                                        convert_to_array(*ssl);
                                        array_merge(*opt, *ssl);
                                        continue;