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

Conversation

michaellenahan
Copy link

This is my first contribution to Symfony. Thank you @Deltachaos for your help today at the Hackday in Cologne.

@Deltachaos
Copy link

Just for the record. This fixes #7311

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null should be enclosed with two backticks like this:

[...] field may be ``null``.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

choice_value should also be enclosed with double backticks

@xabbuh
Copy link
Member

xabbuh commented Apr 12, 2017

👍

Michael Lenahan and others added 2 commits April 13, 2017 13:50
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 @michaellenahan thanks for your first contribution!

I've made a minor fix (we need two backticks instead of three) but your pull request was perfect otherwise. Thanks.

@xabbuh
Copy link
Member

xabbuh commented Apr 15, 2017

Thank you @michaellenahan.

xabbuh added a commit that referenced this pull request Apr 15, 2017
… Lenahan, javiereguiluz)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #7775).

Discussion
----------

#7311 choice_value callback argument can be null

This is my first contribution to Symfony. Thank you @Deltachaos for your help today at the Hackday in Cologne.

Commits
-------

bf604e5 Fixed a syntax issue
da1bbb2 Use backticks
c274800 #7311 choice_value callback argument can be null
@xabbuh xabbuh closed this Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants