浏览代码

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

Grégoire Paris 8 年之前
父节点
当前提交
3704ab941d
共有 1 个文件被更改,包括 3 次插入3 次删除
  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 %}