소스 검색

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 %}