symfony/assetic-bundle v2.8.2 v2.8.2 Integrates Assetic into S...
Package symfony/assetic-bundle is abandoned, you should avoid using it. Use symfony/webpack-encore-pack instead.
symfony/framework-standard-edition v2.7.48 v3.4.11 The "Symfony Standard Edi...
symfony/monolog-bundle v3.2.0 v3.2.0 Symfony MonologBundle
symfony/polyfill-apcu v1.8.0 v1.8.0 Symfony polyfill backport...
symfony/polyfill-mbstring v1.8.0 v1.8.0 Symfony polyfill for the ...
symfony/polyfill-php70 v1.8.0 v1.8.0 Symfony polyfill backport...
symfony/polyfill-php71 v1.8.0 v1.8.0 Symfony polyfill backport...
symfony/polyfill-php72 v1.8.0 v1.8.0 Symfony polyfill backport...
symfony/polyfill-util v1.8.0 v1.8.0 Symfony utilities for por...
symfony/swiftmailer-bundle v2.6.7 v3.2.2 Symfony SwiftmailerBundle
symfony/symfony v2.7.43 v4.1.0 The Symfony PHP framework
PHP version
PHP 7.2.5
Subject
Trying to load an admin edit page with no form fields will result in the following error:
Impossible to access a key ("default") on a boolean variable ("").
The template base_edit_form.html.twig is accessing admin.formtabs['default'].groups without testing if formtabs is actually an array or if the key 'default' is actually defined for the array formtabs.
Steps to reproduce
Create an Admin class with an empty configureFormFields method
Navigate to that page
Expected results
A admin edit page with not form fields
Actual results
Twig-Error:
Impossible to access a key ("default") on a boolean variable ("").
Environment
Sonata packages
Symfony packages
PHP version
Subject
Trying to load an admin edit page with no form fields will result in the following error:
Impossible to access a key ("default") on a boolean variable ("").
The template base_edit_form.html.twig is accessing admin.formtabs['default'].groups without testing if formtabs is actually an array or if the key 'default' is actually defined for the array formtabs.
Steps to reproduce
Expected results
A admin edit page with not form fields
Actual results
Twig-Error: Impossible to access a key ("default") on a boolean variable ("").
[1] Twig_Error_Runtime: Impossible to access a key ("default") on a boolean variable (""). at n/a in /var/www/users/sob/poi-dev/vendor/sonata-project/admin-bundle/Resources/views/CRUD/base_edit_form.html.twig line 58 at Twig_Template->getAttribute(false, 'default', array(), 'array') in /var/www/users/sob/poi-dev/app/cache/dev/twig/06/06dec9a5bd279a625e6bf4c5c40cb2b9334885abc0f01d637ecd0fe8ff548a77.php line 313 at TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893->block_sonata_tab_content(array('action' => 'edit', 'form' => object(FormView), 'object' => object(POIGroup), 'objectId' => '1', 'breadcrumbs_builder' => object(BreadcrumbsBuilder), 'admin' => object(POIGroupAdmin), 'base_template' => 'RedlinkPOIFinderBundle::backend_base_layout.html.twig', 'admin_pool' => object(Pool), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'wrap_fields_with_addons' => true, 'locale' => 'de', 'app' => object(AppVariable), 'sonata_block' => object(GlobalVariables), 'sonata_admin' => object(GlobalVariables), 'sonata_user' => object(GlobalVariables), '_preview' => null, 'form_helper' => object(TwigTemplate_1a14088a674dd14ed8b6ae76a1ab10d830fc1ed48070b57ac523a25dfb679831), 'url' => 'edit', 'has_tab' => false), array('html_attributes' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_html_attributes'), 'meta_tags' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_meta_tags'), 'stylesheets' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_stylesheets'), 'javascripts' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_javascripts'), 'sonata_javascript_config' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_javascript_config'), 'sonata_javascript_pool' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_javascript_pool'), 'sonata_head_title' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_head_title'), 'body_attributes' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_body_attributes'), 'sonata_header' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_header'), 'sonata_header_noscript_warning' => array(object(__TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_header_noscript_warning'), 'logo' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_logo'), 'sonata_nav' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_nav'), 'sonata_breadcrumb' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_breadcrumb'), 'sonata_top_nav_menu' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_sonata_top_nav_menu'), 'sonata_top_nav_menu_add_block' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_top_nav_menu_add_block'), 'sonata_top_nav_menu_user_block' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_top_nav_menu_user_block'), 'sonata_wrapper' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_wrapper'), 'sonata_left_side' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_left_side'), 'sonata_side_nav' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_side_nav'), 'sonata_sidebar_search' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_sidebar_search'), 'side_bar_before_nav' => array(object(__TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_side_bar_before_nav'), 'side_bar_nav' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_side_bar_nav'), 'side_bar_after_nav' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_side_bar_after_nav'), 'side_bar_after_nav_content' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_side_bar_after_nav_content'), 'sonata_page_content' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_page_content'), 'sonata_page_content_header' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_page_content_header'), 'sonata_page_content_nav' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_sonata_page_content_nav'), 'tab_menu_navbar_header' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_tab_menu_navbar_header'), 'sonata_admin_content_actions_wrappers' => array(object(TwigTemplate_3950e20fab26625787e95efe81e6de264856ad66677920685544b2e4ae67bf9e), 'block_sonata_admin_content_actions_wrappers'), 'sonata_admin_content' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_sonata_admin_content'), 'notice' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_notice'), 'bootlint' => array(object(TwigTemplate_ea6608baeea2939255462494424a106dd109c7d228aded5736c6fb7e3ed2ec78), 'block_bootlint'), 'sonata_tab_content' => array(object(TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_sonata_tab_content'), 'sonata_form_action_url' => array(object(__TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_sonata_form_action_url'), 'sonata_form_attributes' => array(object(TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_sonata_form_attributes'), 'sonata_pre_fieldsets' => array(object(TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_sonata_pre_fieldsets'), 'sonata_post_fieldsets' => array(object(TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_sonata_post_fieldsets'), 'formactions' => array(object(TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_formactions'), 'sonata_form_actions' => array(object(TwigTemplate_4a7ab8131dd804c2aa0a3bb47a72542cd7d9cf1a6e4378d58121a1d172922deb), 'block_sonata_form_actions'), 'parentForm' => array(object(TwigTemplate_e43f142451c998a1572f98035834810975607d8590468524d0bf724c2ebde893), 'block_form'), 'title' => array(object(TwigTemplate_c91b5caab6ef42e040e05527d3423fd09a2a1e131544fb7da3a10f8c76a4db3c), 'block_title'), 'navbar_title' => array(object(TwigTemplate_c91b5caab6ef42e040e05527d3423fd09a2a1e131544fb7da3a10f8c76a4db3c), 'block_navbar_title'), 'actions' => array(object(__TwigTemplate_c91b5caab6ef42e040e05527d3423fd09a2a1e131544fb7da3a10f8c76a4db3c), 'block_actions'), 'tab_menu' => array(object(TwigTemplate_c91b5caab6ef42e040e05527d3423fd09a2a1e131544fb7da3a10f8c76a4db3c), 'block_tab_menu'), 'form' => array(object(__TwigTemplate_c91b5caab6ef42e040e05527d3423fd09a2a1e131544fb7da3a10f8c76a4db3c), 'block_form'))) in /var/www/users/sob/poi-dev/vendor/twig/twig/lib/Twig/Template.php line 215