Skip to content

Commit d1cb722

Browse files
committed
Reword
1 parent 424c4ef commit d1cb722

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

validation.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,9 @@ class to have at least 3 characters.
613613
614614
.. caution::
615615

616-
With PHP 7.4, typed properties were introduced. If a property is accessed
617-
before a value is assigned (explicitly or as a default value), PHP will
618-
throw an exception. To avoid that, the Validator will use ``null`` as the
619-
properties value if it's uninitialized.
616+
The validator will use a value ``null`` if a typed property is uninitialized.
617+
This can cause unexpected behavior if the property holds a value when initialized.
618+
In order to avoid this, make sure all properties are initialized before validating them.
620619

621620
.. index::
622621
single: Validation; Getter constraints

0 commit comments

Comments
 (0)