From 381c376e21cd963f1afacc05643a90367558de9e Mon Sep 17 00:00:00 2001 From: Andrej Hudec Date: Mon, 13 Jul 2015 08:15:20 +0200 Subject: [PATCH] Added check if sortable variable is defined in form_admin_fields.html.twig This fixes edge case if someone is using overloaded choice type in his project without changes in template. --- Resources/views/Form/form_admin_fields.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/views/Form/form_admin_fields.html.twig b/Resources/views/Form/form_admin_fields.html.twig index 3287056246..d18cee560b 100755 --- a/Resources/views/Form/form_admin_fields.html.twig +++ b/Resources/views/Form/form_admin_fields.html.twig @@ -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 %}