Skip to content
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

Fixed choice_list for ModelType #682

Merged
merged 2 commits into from
Apr 13, 2012
Merged

Fixed choice_list for ModelType #682

merged 2 commits into from
Apr 13, 2012

Conversation

pulse00
Copy link
Contributor

@pulse00 pulse00 commented Apr 13, 2012

This PR fixes a fatal error in the getDefaultOptions() method of the ModelType. The choice_list closure returned only a ModelChoiceList when the $previousValue was null, but this is an instance of a ChoiceListInterface now - with an empty choices array.

);

if ($previousValue instanceof ChoiceListInterface
&& count($choices = $previousValue->getChoices())) {
Copy link
Member

Choose a reason for hiding this comment

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

this does not respect the CS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should it go in 1 line instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to phpcs this is CS compliant now.

rande added a commit that referenced this pull request Apr 13, 2012
Fixed choice_list for ModelType
@rande rande merged commit dae8526 into sonata-project:master Apr 13, 2012
ft-1408 pushed a commit to intexsys/SonataAdminBundle that referenced this pull request Sep 17, 2021
Fixed German and Ukrainian translations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants