diff options
author | George Peter Banyard <girgias@php.net> | 2019-12-08 21:03:14 +0100 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2019-12-08 21:03:14 +0100 |
commit | 734932ecbbddf18109e5c60701b1dc8ab97fc88c (patch) | |
tree | 2e887c03152963e6640400d871e12ed88d30a3b5 /ext/json/json.c | |
parent | 761e8c7707bd790382316ad1db910841dabdc1b3 (diff) | |
download | php-git-734932ecbbddf18109e5c60701b1dc8ab97fc88c.tar.gz |
Convert warnings to ValueError
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 8 |
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 */ |