X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_params.c;h=828eb9371177edd80bb7e2a452cb7fb242e91351;hb=7cf7de66661e7e40a63c960f5df17fdeb362cb73;hp=1be8e55ecd1b5baa34e70a252cb97f60d63454e5;hpb=16ecea28f2bbcf20d69dedc6611a959923720656;p=m6w6%2Fext-http diff --git a/php_http_params.c b/php_http_params.c index 1be8e55..828eb93 100644 --- a/php_http_params.c +++ b/php_http_params.c @@ -445,9 +445,12 @@ static void merge_param(HashTable *params, zval *zdata, zval **current_param, zv if (Z_TYPE_P(test_ptr) == IS_ARRAY) { /* 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 { + ptr = tmp_ptr; Z_TRY_ADDREF_P(test_ptr); ptr = zend_hash_update(Z_ARRVAL_P(ptr), hkey.key, test_ptr); break;