From d8798a8a41487c3b4e5664996f1e5d4944e1c2af Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Wed, 17 Oct 2012 21:47:28 +0200 Subject: [PATCH] (bug 40857) fix non-array sidebar links handling in CologneBlue Thanks to Daniel Friesen for explanation on why a non-array can appear there. Change-Id: Ib51c640b9cb10a8acc8fe4033f71463e36770dbe --- skins/CologneBlue.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 473ee2b441..a8e308add3 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -590,7 +590,7 @@ class CologneBlueTemplate extends BaseTemplate { // Personal tools ("My pages") $bar['qbmyoptions'] = $this->getPersonalTools(); foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) { - $bar['qbmyoptions'][$key] = false; + $bar['qbmyoptions'][$key] = null; } $additions_done = true; @@ -614,8 +614,8 @@ class CologneBlueTemplate extends BaseTemplate { $s .= $this->searchForm( 'sidebar' ); } elseif ( $heading == 'LANGUAGES' ) { // discard these; we display languages below page content - } else { - if ( $links ) { + } elseif ( $links ) { + if ( is_array( $links ) ) { // Use the navigation heading from standard sidebar as the "browse" section if ( $heading == 'navigation' ) { $heading = 'qbbrowse'; @@ -639,6 +639,9 @@ class CologneBlueTemplate extends BaseTemplate { if ( $any_link ) { $s .= $t; } + } else { + // $links can be a HTML string + $s .= $links; } } } -- 2.20.1