- fix php4 build
[m6w6/ext-http] / http_request_object.c
index 9efde2d9129c9da99b2fe5854eeb5683f42c3172..f2e6c463af8ef5bdd07e362cf5dded308550e95a 100644 (file)
@@ -525,11 +525,11 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this
 
                        } while ((response = response->parent) && (request = request->parent));
 
-                       http_message_free(free_msg);
+                       http_message_free(&free_msg);
                        phpstr_fix(&obj->history);
                }
 
-               UPD_PROP(obj, long, responseCode, msg->info.response.code);
+               UPD_PROP(obj, long, responseCode, msg->http.info.response.code);
 
                MAKE_STD_ZVAL(headers)
                array_init(headers);
@@ -562,7 +562,7 @@ static inline void _http_request_object_set_options_subr(INTERNAL_FUNCTION_PARAM
        zval *opts, **options, *new_options = NULL;
        getObject(http_request_object, obj);
 
-       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!", &new_options)) {
+       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a/!", &new_options)) {
                RETURN_FALSE;
        }
 
@@ -670,7 +670,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;
        }