mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Convert warnings to ValueError
This commit is contained in:
parent
761e8c7707
commit
734932ecbb
3 changed files with 18 additions and 12 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue