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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 5c97e9678d..9a8f259f01 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -340,7 +340,7 @@ static PHP_FUNCTION(json_decode)
static PHP_FUNCTION(json_last_error)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_LONG(JSON_G(error_code));
@@ -352,7 +352,7 @@ static PHP_FUNCTION(json_last_error)
static PHP_FUNCTION(json_last_error_msg)
{
if (zend_parse_parameters_none() == FAILURE) {
- return;
+ RETURN_THROWS();
}
RETURN_STRING(php_json_get_error_msg(JSON_G(error_code)));