From 42257dc68a6d95618f7d5ad29e1e741a59aab2e3 Mon Sep 17 00:00:00 2001 From: Huji Date: Thu, 24 Jan 2008 17:06:19 +0000 Subject: [PATCH] (bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errors. * The previous commit didn't cover the cases where the whole caption line was missing. --- includes/Skin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Skin.php b/includes/Skin.php index b6d15bd131..2d2a4aecc3 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1626,7 +1626,6 @@ END; if (strpos($line, '**') !== 0) { $line = trim($line, '* '); $heading = $line; - if( strlen($heading) == 0) $heading=''; } else { if (strpos($line, '|') !== false) { // sanity check $line = explode( '|' , trim($line, '* '), 2 ); @@ -1650,6 +1649,7 @@ END; } } + if( !isset($heading) ) $heading=''; $bar[$heading][] = array( 'text' => $text, 'href' => $href, -- 2.20.1