10000 #7311 choice_value callback argument can be null · symfony/symfony-docs@c274800 · GitHub
[go: up one dir, main page]

Skip to content

Commit c274800

Browse files
Michael Lenahanxabbuh
Michael Lenahan
authored andcommitted
#7311 choice_value callback argument can be null
1 parent 671a124 commit c274800

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

reference/forms/types/options/choice_value.rst.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ configure the value that will be sent in the API request).
1414
This can be a callable or a property path. See `choice_label`_ for similar usage.
1515
If ``null`` is used, an incrementing integer is used as the name.
1616
17+
If you are using a callable to populate choice_value, you need to check for the
18+
case that the value of the field may be null.
19+
1720
.. caution::
1821
1922
In Symfony 2.7, there was a small backwards-compatibility break with how the

0 commit comments

Comments
 (0)
0