Skip to content

Commit 3466be4

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [Validator] PHP 7.4 uninitialized typed property handling
2 parents 4e88dc5 + d1cb722 commit 3466be4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

validation.rst

Lines changed: 6 additions & 0 deletions
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)