Skip to content

#7311 choice_value callback argument can be null #7775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions reference/forms/types/options/choice_value.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ configure the value that will be sent in the API request).
This can be a callable or a property path. See `choice_label`_ for similar usage.
If ``null`` is used, an incrementing integer is used as the name.

If you are using a callable to populate ``choice_value``, you need to check
for the case that the value of the field may be ``null``.

.. caution::

In Symfony 2.7, there was a small backwards-compatibility break with how the
Expand Down