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 (…
…#49474) * test: validateJson should return false when value is null Fails with Laravel Framework 10.38.2 in PHP < 8.3, introduced in #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 <rogelio@elabmexico.com>
- Loading branch information