summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c8
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)));
}