Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Avoid TypeError when using json validation rule when PHP < 8.3 #49474

Merged
merged 2 commits into from Dec 23, 2023

Commits on Dec 22, 2023

  1. test: validateJson should return false when value is null

    Fails with Laravel Framework 10.38.2 in PHP < 8.3, introduced in laravel#49413
    Xint0-elab committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    cb19e13 View commit details
    Browse the repository at this point in the history
  2. fix: validateJson should return false when value is null

    Return false when $value is null.
    
    Avoid TypeError: json_validate(): Argument laravel#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 laravel#1 ($json) of type string is deprecated, when using PHP 8.3.
    Xint0-elab committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    fbe882d View commit details
    Browse the repository at this point in the history