8000 [Form] Fixed behavior of empty value if already defined by fspillner · Pull Request #3864 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Fixed behavior of empty value if already defined #3864

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 6 commits into from
Closed

[Form] Fixed behavior of empty value if already defined #3864

wants to merge 6 commits into from

Conversation

fspillner
Copy link

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3854
Todo: -

public function valuesContains($searchValue)
{
foreach ($this->values as $value)
{
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in same line as foreach

@fspillner
Copy link
Author

Fixed, thanks @stloyd

*
* @return boolean
*/
function valuesContains($searchValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong English. valuesContain would be correct but is not really nice anyway.

Copy link
Author

Choose a reason for hiding this comment

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

@Tobion Do you have better naming suggestion? Otherwise I'll correct the english :)

@fspillner
Copy link
Author

@bschussek: Ping?

@webmozart
Copy link
Contributor

@fspillner Thank you for the PR! The implementation is not correct though. You are checking whether the values contain the contents of the "empty_value" option, but this option contains the label of the empty value ''.

I fixed this issue in the referenced PR #4801.

fabpot added a commit that referenced this pull request Jul 9, 2012
Commits
-------

040ba8f [Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element

Discussion
----------

[Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3854, #3864
Todo: -
@fabpot fabpot closed this Jul 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0