We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 416420b commit 91227c5Copy full SHA for 91227c5
ext/json/json.c
@@ -303,8 +303,7 @@ PHP_FUNCTION(json_validate)
303
Z_PARAM_LONG(options)
304
ZEND_PARSE_PARAMETERS_END();
305
306
-
307
- if ((options != 0) && (options != PHP_JSON_INVALID_UTF8_IGNORE)) {
+ if (options != 0 && options != PHP_JSON_INVALID_UTF8_IGNORE) {
308
zend_argument_value_error(3, "must be a valid flag (allowed flags: JSON_INVALID_UTF8_IGNORE)");
309
RETURN_THROWS();
310
}
@@ -315,7 +314,7 @@ PHP_FUNCTION(json_validate)
315
314
316
317
JSON_G(error_code) = PHP_JSON_ERROR_NONE;
318
+
319
if (depth <= 0) {
320
zend_argument_value_error(2, "must be greater than 0");
321
0 commit comments