Skip to content

Commit 04e46ae

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: [Validator] PHP 7.4 uninitialized typed property handling
2 parents 7da700f + 3466be4 commit 04e46ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

validation.rst

+6
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,12 @@ class to have at least 3 characters.
611611
}
612612
}
613613
614+
.. caution::
615+
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.
619+
614620
.. index::
615621
single: Validation; Getter constraints
616622

0 commit comments

Comments
 (0)