forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10.x] Avoid TypeError when using json validation rule when PHP < 8.3 (…
…laravel#49474) * test: validateJson should return false when value is null Fails with Laravel Framework 10.38.2 in PHP < 8.3, introduced in laravel#49413 * fix: validateJson should return false when value is null Return false when $value is null. Avoid TypeError: json_validate(): Argument #1 ($json) must be of type string, null given, when using symfony/polyfill-php83 in PHP < 8.3. Avoid deprecation warning: json_validate(): Passing null to parameter #1 ($json) of type string is deprecated, when using PHP 8.3. --------- Co-authored-by: Rogelio Jacinto <[email protected]>
- Loading branch information
1 parent
6c53284
commit 8837c1f
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters