From: Huji Date: Thu, 24 Jan 2008 17:06:19 +0000 (+0000) Subject: (bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errors. X-Git-Tag: 1.31.0-rc.0~49795 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=42257dc68a6d95618f7d5ad29e1e741a59aab2e3;p=lhc%2Fweb%2Fwiklou.git (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. --- 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,