@@ -46,6 +46,7 @@ public static function jsonDataProvider(): iterable
46
46
yield [true , '{ "test": {"foo": "bar"}, "test2": {"foo" : "bar" }, "test3": {"foo" : "bar" } } ' ];
47
47
yield [false , '{"key1":"value1", "key2":"value2"} ' , 'Maximum stack depth exceeded ' , 1 ];
48
48
yield [false , "\"a \xb0b \"" , 'Malformed UTF-8 characters, possibly incorrectly encoded ' ];
49
+ yield [true , '{ "test": { "foo": "bar" } } ' , 'No error ' , 2147483647 ];
49
50
50
51
if (\defined ('JSON_INVALID_UTF8_IGNORE ' )) {
51
52
yield [true , "\"a \xb0b \"" , 'No error ' , 512 , \JSON_INVALID_UTF8_IGNORE ];
@@ -73,8 +74,9 @@ public function testInvalidOptionsProvided(int $depth, int $flags, string $expec
73
74
public static function invalidOptionsProvider (): iterable
74
75
{
75
76
yield [0 , 0 , 'json_validate(): Argument #2 ($depth) must be greater than 0 ' ];
76
- yield [\PHP_INT_MAX , 0 , 'json_validate(): Argument #2 ($depth) must be less than 2147483647 ' ];
77
-
77
+ if (\PHP_INT_MAX > 2147483647 ) {
78
+ yield [\PHP_INT_MAX , 0 , 'json_validate(): Argument #2 ($depth) must be less than 2147483647 ' ];
79
+ }
78
80
if (\defined ('JSON_INVALID_UTF8_IGNORE ' )) {
79
81
yield [
80
82
512 ,
0 commit comments