X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_env.c;h=99ea0e00f4d8732c8ac7261e480d2d8c1f54b5f8;hb=8d084b7e31a4985d75e74efbabf21a818513fd0f;hp=eef0c37aad541fb1d64ce933d13fd63a3ff2f19c;hpb=c51b7204d895c33124de9799fdbe16eb7bb8158d;p=m6w6%2Fext-http 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); }