Skip to content

[Validator] getClassMetadata on null value #37554

@biozshock

Description

@biozshock

Symfony version(s) affected: 3.4.41

Description
After merging symfony/validator@b50cd17 there is a possibility to have an exception (here https://github.com/symfony/validator/blob/b50cd17d3a154d096344ef22f54b8e3655cdf913/Validator/RecursiveContextualValidator.php#L317) when running down the code with null value as a result of $value->getPropertyValue().
For me that caused that the form errors were not mapped back to form children fields.

How to reproduce
Create a validator with getter validation, pass an object with such a validation to the form.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions