From ede64c3d1e557f7c1fded44adf18440a21ea0807 Mon Sep 17 00:00:00 2001 From: Huji Date: Thu, 24 Jan 2008 12:52:53 +0000 Subject: [PATCH] (bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errors --- RELEASE-NOTES | 1 + includes/Skin.php | 1 + 2 files changed, 2 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a20975de9e..d17735ecba 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -336,6 +336,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 6436) Localization of Special:Import XML parser Error message(s). * Security fix for API on MSIE * (bug 12768) Database query syntax error in maintenance/storage/compressOld.inc +* (bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errors == Parser changes in 1.12 == diff --git a/includes/Skin.php b/includes/Skin.php index fe4bb93974..b6d15bd131 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1626,6 +1626,7 @@ 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 ); -- 2.20.1