From 80b74233cfed0408bb9da32c298508d31b99f3e7 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Wed, 9 Mar 2011 22:08:28 +0100 Subject: [PATCH] fixed: PHP Error when secondary Menu is disabled - 1084504 --- template.php | 4 +++- templates/page.tpl.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/template.php b/template.php index eed905b..bb7e4ff 100644 --- a/template.php +++ b/template.php @@ -224,7 +224,9 @@ function zen_preprocess_page(&$variables, $hook) { // Find the title of the menu used by the secondary links. $secondary_links = variable_get('menu_secondary_links_source', 'user-menu'); $menus = menu_get_menus(); - $variables['secondary_menu_heading'] = $menus[$secondary_links]; + if(!empty($secondary_links)) { + $variables['secondary_menu_heading'] = $menus[$secondary_links]; + } } /** diff --git a/templates/page.tpl.php b/templates/page.tpl.php index 470b65c..f6fa78d 100644 --- a/templates/page.tpl.php +++ b/templates/page.tpl.php @@ -97,6 +97,7 @@ + $secondary_menu, 'attributes' => array( @@ -109,6 +110,7 @@ 'class' => array('element-invisible'), ), )); ?> + -- 1.7.4.1