Bläddra i källkod

Removed Twig deprecation when calling block() with an undefined block

WouterJ 8 år sedan
förälder
incheckning
d502a58b48
1 ändrade filer med 12 tillägg och 12 borttagningar
  1. 12 12
      Resources/views/standard_layout.html.twig

+ 12 - 12
Resources/views/standard_layout.html.twig

@@ -8,18 +8,18 @@ For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.
 file that was distributed with this source code.
 
 
 #}
 #}
-{% set _preview              = block('preview') %}
-{% set _form                 = block('form') %}
-{% set _show                 = block('show') %}
-{% set _list_table           = block('list_table') %}
-{% set _list_filters         = block('list_filters') %}
-{% set _tab_menu             = block('tab_menu') %}
-{% set _content              = block('content') %}
-{% set _title                = block('title') %}
-{% set _breadcrumb           = block('breadcrumb') %}
-{% set _actions              = block('actions') %}
-{% set _navbar_title         = block('navbar_title') %}
-{% set _list_filters_actions = block('list_filters_actions') %}
+{% set _preview              = block('preview') is defined ? block('preview') : null %}
+{% set _form                 = block('form') is defined ? block('form') : null %}
+{% set _show                 = block('show') is defined ? block('show') : null %}
+{% set _list_table           = block('list_table') is defined ? block('list_table') : null %}
+{% set _list_filters         = block('list_filters') is defined ? block('list_filters') : null %}
+{% set _tab_menu             = block('tab_menu') is defined ? block('tab_menu') : null %}
+{% set _content              = block('content') is defined ? block('content') : null %}
+{% set _title                = block('title') is defined ? block('title') : null %}
+{% set _breadcrumb           = block('breadcrumb') is defined ? block('breadcrumb') : null %}
+{% set _actions              = block('actions') is defined ? block('actions') : null %}
+{% set _navbar_title         = block('navbar_title') is defined ? block('navbar_title') : null %}
+{% set _list_filters_actions = block('list_filters_actions') is defined ? block('list_filters_actions') : null %}
 
 
 <!DOCTYPE html>
 <!DOCTYPE html>
 <html {% block html_attributes %}class="no-js"{% endblock %}>
 <html {% block html_attributes %}class="no-js"{% endblock %}>