From 734932ecbbddf18109e5c60701b1dc8ab97fc88c Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 8 Dec 2019 21:03:14 +0100 Subject: Convert warnings to ValueError --- ext/json/json.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/json/json.c') 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 */ -- cgit v1.2.1