From: Michael Wallner Date: Thu, 22 Jan 2015 08:34:35 +0000 (+0100) Subject: simplify X-Git-Tag: RELEASE_3_0_0_RC1~73 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=c257c6b60913ad43e74d7b5937f5c9f8144d8907 simplify --- diff --git a/php_http_env.c b/php_http_env.c index eef0c37..99ea0e0 100644 --- a/php_http_env.c +++ b/php_http_env.c @@ -957,18 +957,10 @@ static SAPI_POST_HANDLER_FUNC(php_http_json_post_handler) ZVAL_NULL(&tmp); php_json_decode(&tmp, json->val, json->len, 1, PG(max_input_nesting_level)); - switch (Z_TYPE(tmp)) { - case IS_NULL: - break; - - case IS_ARRAY: + if (Z_TYPE(tmp) == IS_ARRAY) { array_copy(Z_ARRVAL(tmp), Z_ARRVAL_P(zarg)); - zval_ptr_dtor(&tmp); - break; - - default: - ZVAL_COPY_VALUE(zarg, &tmp); } + zval_ptr_dtor(&tmp); } zend_string_release(json); }