From e67b70752bcc37ccf96d512a81799298f707682e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 13 Jul 2016 13:14:43 +0200 Subject: [PATCH] proper fix for #47 --- src/php_http_params.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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)); -- 2.30.2