* zval_add_ref() expects zval **
authorMichael Wallner <mike@php.net>
Fri, 18 Mar 2005 10:40:04 +0000 (10:40 +0000)
committerMichael Wallner <mike@php.net>
Fri, 18 Mar 2005 10:40:04 +0000 (10:40 +0000)
http_methods.c

index e4042a11c9b805fcdae5051d74717cf43a653e48..0f80c6ce21e3441e3772523953ebf1de35ac689b 100644 (file)
@@ -635,9 +635,9 @@ PHP_METHOD(HTTPi_Request, getOptions)
 PHP_METHOD(HTTPi_Request, unsetOptions)
 {
        getObject(httpi_request_object, obj);
-       
+
        NO_ARGS;
-       
+
        FREE_PARR(obj, options);
        INIT_PARR(obj, options);
 }
@@ -651,20 +651,20 @@ PHP_METHOD(HTTPi_Request, addHeader)
 {
        zval *opts, **headers, *new_headers;
        getObject(httpi_request_object, obj);
-       
+
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &new_headers)) {
                RETURN_FALSE;
        }
-       
+
        opts = GET_PROP(obj, options);
-       
+
        if (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), "headers", sizeof("headers"), (void **) &headers)) {
                array_merge(new_headers, *headers);
        } else {
-               zval_add_ref(new_headers);
+               zval_add_ref(&new_headers);
                add_assoc_zval(opts, "headers", new_headers);
        }
-       
+
        RETURN_TRUE;
 }
 /* }}} */
@@ -677,20 +677,20 @@ PHP_METHOD(HTTPi_Request, addCookie)
 {
        zval *opts, **cookies, *new_cookies;
        getObject(httpi_request_object, obj);
-       
+
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &new_cookies)) {
                RETURN_FALSE;
        }
-       
+
        opts = GET_PROP(obj, options);
-       
+
        if (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), "cookies", sizeof("cookies"), (void **) &cookies)) {
                array_merge(new_cookies, *cookies);
        } else {
-               zval_add_ref(new_cookies);
+               zval_add_ref(&new_cookies);
                add_assoc_zval(opts, "cookies", new_cookies);
        }
-       
+
        RETURN_TRUE;
 }
 /* }}} */