summaryrefslogtreecommitdiff
path: root/ext/json
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2019-12-31 16:58:15 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2019-12-31 16:58:15 +0100
commit12ce73a5bb5554f45950b6bcf85100f0b2db960e (patch)
treec5cc242ad37cb13eb4f4aa5d460afae947733c72 /ext/json
parent817605917bae487ffbdc03226ec8f536b6d1bc66 (diff)
downloadphp-git-12ce73a5bb5554f45950b6bcf85100f0b2db960e.tar.gz
Use RETURN_THROWS() after zend_value_error()
Diffstat (limited to 'ext/json')
-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 9a8f259f01..4645309741 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -314,12 +314,12 @@ static PHP_FUNCTION(json_decode)
if (depth <= 0) {
zend_value_error("Depth must be greater than zero");
- return;
+ RETURN_THROWS();
}
if (depth > INT_MAX) {
zend_value_error("Depth must be lower than %d", INT_MAX);
- return;
+ RETURN_THROWS();
}
/* For BC reasons, the bool $assoc overrides the long $options bit for PHP_JSON_OBJECT_AS_ARRAY */