From 8f4f1dea34e255eff8ff4d13960d287d809665a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 3 Jan 2020 12:11:45 +0100 Subject: Convert zend_parse_parameters_none() to fast ZPP I've done the conversion in those extensions where fast ZPP is predominant. --- ext/json/json.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ext/json/json.c') diff --git a/ext/json/json.c b/ext/json/json.c index 06e485bfe4..10ec93e220 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -339,9 +339,7 @@ static PHP_FUNCTION(json_decode) Returns the error code of the last json_encode() or json_decode() call. */ static PHP_FUNCTION(json_last_error) { - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } + ZEND_PARSE_PARAMETERS_NONE(); RETURN_LONG(JSON_G(error_code)); } @@ -351,9 +349,7 @@ static PHP_FUNCTION(json_last_error) Returns the error string of the last json_encode() or json_decode() call. */ static PHP_FUNCTION(json_last_error_msg) { - if (zend_parse_parameters_none() == FAILURE) { - RETURN_THROWS(); - } + ZEND_PARSE_PARAMETERS_NONE(); RETURN_STRING(php_json_get_error_msg(JSON_G(error_code))); } -- cgit v1.2.1