Skip to content

Commit

Permalink
Added check if sortable variable is defined in form_admin_fields.html…
Browse files Browse the repository at this point in the history
….twig

This fixes edge case if someone is using overloaded choice type in his project without changes in template.
  • Loading branch information
pulzarraider committed Jul 13, 2015
1 parent 12fc8df commit 381c376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ file that was distributed with this source code.
{% set required = false %}
{% endif %}
{% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
{% if sortable and multiple %}
{% if (sortable is defined) and sortable and multiple %}
{{ block('sonata_type_choice_multiple_sortable') }}
{% else %}
<select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %} >
Expand Down

0 comments on commit 381c376

Please sign in to comment.