From: Michael Wallner Date: Thu, 22 Dec 2005 16:33:29 +0000 (+0000) Subject: - here goes the same with cookies X-Git-Tag: RELEASE_0_21_0~44 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9be7183348cb7dc54ca125e6b5670aaba5db01d3;p=m6w6%2Fext-http - here goes the same with cookies --- diff --git a/http_request_api.c b/http_request_api.c index 260b1f4..a61dc36 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -505,13 +505,16 @@ PHP_HTTP_API STATUS _http_request_prepare(http_request *request, HashTable *opti if (cookie_key) { zval **cookie_val; if (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(zoption), (void **) &cookie_val, &pos)) { - zval *cpy, *val = convert_to_type_ex(IS_STRING, *cookie_val, &cpy); + zval val; + + val = **cookie_val; + INIT_PZVAL(&val); + zval_copy_ctor(&val); + convert_to_string(&val); phpstr_appendf(&request->_cache.cookies, "%s=%s; ", cookie_key, Z_STRVAL_P(val)); - if (cpy) { - zval_ptr_dtor(&cpy); - } + zval_dtor(&val); } /* reset */