X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_querystring.c;h=7c569de763b31414157d01e6c23f27c362a29cda;hb=179b9e4d1c888871a3393a6045dfb675a14b6675;hp=d77bbdaceccfc5bdf1ac586527b14af8c9a47797;hpb=4062420a5e5d301db4a3d820be881e7675a242e1;p=m6w6%2Fext-http diff --git a/php_http_querystring.c b/php_http_querystring.c index d77bbda..7c569de 100644 --- a/php_http_querystring.c +++ b/php_http_querystring.c @@ -6,17 +6,14 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2010, Michael Wallner | + | Copyright (c) 2004-2011, Michael Wallner | +--------------------------------------------------------------------+ */ -/* $Id$ */ +#include "php_http_api.h" -#include "php_http.h" - -#include
+#include #include -#include #ifdef PHP_HTTP_HAVE_ICONV # undef PHP_ATOM_INC @@ -148,23 +145,22 @@ PHP_HTTP_API STATUS php_http_querystring_update(zval *qarray, zval *params, zval } } } else { + zval *entry; /* * add */ if (Z_TYPE_PP(params_entry) == IS_OBJECT) { - zval *new_array; - - MAKE_STD_ZVAL(new_array); - array_init(new_array); - php_http_querystring_update(new_array, *params_entry, NULL TSRMLS_CC); - *params_entry = new_array; + MAKE_STD_ZVAL(entry); + array_init(entry); + php_http_querystring_update(entry, *params_entry, NULL TSRMLS_CC); } else { Z_ADDREF_PP(params_entry); + entry = *params_entry; } if (key.type == HASH_KEY_IS_STRING) { - add_assoc_zval_ex(qarray, key.str, key.len, *params_entry); + add_assoc_zval_ex(qarray, key.str, key.len, entry); } else { - add_index_zval(qarray, key.num, *params_entry); + add_index_zval(qarray, key.num, entry); } } }