summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2019-12-08 21:03:14 +0100
committerGeorge Peter Banyard <girgias@php.net>2019-12-08 21:03:14 +0100
commit734932ecbbddf18109e5c60701b1dc8ab97fc88c (patch)
tree2e887c03152963e6640400d871e12ed88d30a3b5 /ext/json/json.c
parent761e8c7707bd790382316ad1db910841dabdc1b3 (diff)
downloadphp-git-734932ecbbddf18109e5c60701b1dc8ab97fc88c.tar.gz
Convert warnings to ValueError
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 5db3621b32..5c97e9678d 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -313,13 +313,13 @@ static PHP_FUNCTION(json_decode)
}
if (depth <= 0) {
- php_error_docref(NULL, E_WARNING, "Depth must be greater than zero");
- RETURN_NULL();
+ zend_value_error("Depth must be greater than zero");
+ return;
}
if (depth > INT_MAX) {
- php_error_docref(NULL, E_WARNING, "Depth must be lower than %d", INT_MAX);
- RETURN_NULL();
+ zend_value_error("Depth must be lower than %d", INT_MAX);
+ return;
}
/* For BC reasons, the bool $assoc overrides the long $options bit for PHP_JSON_OBJECT_AS_ARRAY */