From: Michael Wallner Date: Mon, 31 Aug 2015 10:38:52 +0000 (+0200) Subject: welcome back from vacation X-Git-Tag: RELEASE_3_0_0_RC1~27 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5f6c55b1d2bcbf49b27726e14fb16b4ab216b6fe;p=m6w6%2Fext-http welcome back from vacation --- diff --git a/php_http_params.c b/php_http_params.c index b6610cf..b51ab71 100644 --- a/php_http_params.c +++ b/php_http_params.c @@ -488,10 +488,10 @@ static void merge_param(HashTable *params, zval *zdata, zval **current_param, zv while (Z_TYPE_P(zdata_ptr) == IS_ARRAY && (test_ptr = zend_hash_get_current_data(Z_ARRVAL_P(zdata_ptr)))) { if (Z_TYPE_P(test_ptr) == IS_ARRAY) { + zval *tmp_ptr = ptr; + /* now find key in ptr */ if (HASH_KEY_IS_STRING == zend_hash_get_current_key(Z_ARRVAL_P(zdata_ptr), &hkey.key, &hkey.h)) { - zval *tmp_ptr = ptr; - if ((ptr = zend_hash_find(Z_ARRVAL_P(ptr), hkey.key))) { zdata_ptr = test_ptr; } else { @@ -504,10 +504,12 @@ static void merge_param(HashTable *params, zval *zdata, zval **current_param, zv if ((ptr = zend_hash_index_find(Z_ARRVAL_P(ptr), hkey.h))) { zdata_ptr = test_ptr; } else if (hkey.h) { + ptr = tmp_ptr; Z_TRY_ADDREF_P(test_ptr); ptr = zend_hash_index_update(Z_ARRVAL_P(ptr), hkey.h, test_ptr); break; } else { + ptr = tmp_ptr; Z_TRY_ADDREF_P(test_ptr); ptr = zend_hash_next_index_insert(Z_ARRVAL_P(ptr), test_ptr); break;