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 a8ad5c8 commit 45c755cCopy full SHA for 45c755c
ext/json/json.c
@@ -303,7 +303,8 @@ PHP_FUNCTION(json_validate)
303
Z_PARAM_LONG(options)
304
ZEND_PARSE_PARAMETERS_END();
305
306
- if (options != 0 && options != PHP_JSON_INVALID_UTF8_IGNORE) {
+
307
+ 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
}
@@ -314,7 +315,7 @@ PHP_FUNCTION(json_validate)
314
315
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