From: Michael Wallner Date: Wed, 13 Jul 2016 11:14:43 +0000 (+0200) Subject: proper fix for #47 X-Git-Tag: RELEASE_2_6_0_BETA1~8 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e67b70752bcc37ccf96d512a81799298f707682e;p=m6w6%2Fext-http proper fix for #47 --- diff --git a/src/php_http_params.c b/src/php_http_params.c index c0071ac..fc75f0e 100644 --- a/src/php_http_params.c +++ b/src/php_http_params.c @@ -522,12 +522,10 @@ static void merge_param(HashTable *params, zval *zdata, zval ***current_param, z static void push_param(HashTable *params, php_http_params_state_t *state, const php_http_params_opts_t *opts TSRMLS_DC) { - if (!state->current.val) { - return; - } - if (state->val.str) { - if (0 < (state->val.len = state->input.str - state->val.str)) { + if (!state->current.val) { + return; + } else if (0 < (state->val.len = state->input.str - state->val.str)) { sanitize_value(opts->flags, state->val.str, state->val.len, *(state->current.val), state->rfc5987 TSRMLS_CC); } else { ZVAL_EMPTY_STRING(*(state->current.val));