Explorar o código

Check Twig blocks exist before rendering them. Fixes #4305 (#4306)

Grégoire Paris %!s(int64=8) %!d(string=hai) anos
pai
achega
3704ab941d
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      Resources/views/ajax_layout.html.twig

+ 3 - 3
Resources/views/ajax_layout.html.twig

@@ -10,9 +10,9 @@ file that was distributed with this source code.
 #}
 
 {% block content %}
-    {% set _list_table           = block('list_table')|trim %}
-    {% set _list_filters         = block('list_filters')|trim %}
-    {% set _list_filters_actions = block('list_filters_actions') %}
+    {% set _list_table = block('list_table') is defined ? block('list_table')|trim : null %}
+    {% set _list_filters = block('list_filters') is defined ? block('list_filters')|trim : null %}
+    {% set _list_filters_actions = block('list_filters_actions') is defined ? block('list_filters_actions') : null %}
 
     {% block preview %}{% endblock %}
     {% block form %}{% endblock %}