diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-03 12:11:45 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-03 13:23:37 +0100 |
commit | 8f4f1dea34e255eff8ff4d13960d287d809665a6 (patch) | |
tree | 54e2758a94191c910cf12bc5cd2b1409568ce51c /ext/json/json.c | |
parent | b7d2882fee4e9c32c42c0fe057a3fdc41e100a06 (diff) | |
download | php-git-8f4f1dea34e255eff8ff4d13960d287d809665a6.tar.gz |
Convert zend_parse_parameters_none() to fast ZPP
I've done the conversion in those extensions where fast ZPP is predominant.
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 8 |
1 files changed, 2 insertions, 6 deletions
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))); } |