You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…ing value (greedyivan)
This PR was squashed before being merged into the 3.4 branch (closes#35532).
Discussion
----------
[Validator] fix access to uninitialized property when getting value
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#35454
| License | MIT
| Doc PR |
In PHP 7.4, the type-hinted property is [uninitialized](https://wiki.php.net/rfc/typed_properties_v2#uninitialized_and_unset_properties) by default. So it needs to be checked before use.
Commits
-------
1edecf7 [Validator] fix access to uninitialized property when getting value
Related: doctrine/orm#7944
Description:
This is the same issue when ReflectionProperty::getValue() uses an uninitialized argument.
How to reproduce:
Validate an object that has an uninitialized property with type hint:
Possible Solution:
Something similar to TypedNoDefaultReflectionProperty.php
Symfony\Component\Validator\Mapping\PropertyMetadata::getPropertyValue:
The text was updated successfully, but these errors were encountered: