Ver código fonte

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

Grégoire Paris 8 anos atrás
pai
commit
3704ab941d
1 arquivos alterados com 3 adições e 3 exclusões
  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 %}