From 9be7183348cb7dc54ca125e6b5670aaba5db01d3 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 22 Dec 2005 16:33:29 +0000 Subject: [PATCH] - here goes the same with cookies --- http_request_api.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 */ -- 2.30.2