r30125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30124‎ | r30125 | r30126 >
Date:17:06, 24 January 2008
Author:huji
Status:old
Tags:
Comment:
(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.
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1626,7 +1626,6 @@
16271627 if (strpos($line, '**') !== 0) {
16281628 $line = trim($line, '* ');
16291629 $heading = $line;
1630 - if( strlen($heading) == 0) $heading='';
16311630 } else {
16321631 if (strpos($line, '|') !== false) { // sanity check
16331632 $line = explode( '|' , trim($line, '* '), 2 );
@@ -1650,6 +1649,7 @@
16511650 }
16521651 }
16531652
 1653+ if( !isset($heading) ) $heading='';
16541654 $bar[$heading][] = array(
16551655 'text' => $text,
16561656 'href' => $href,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r30115(bug 12753) Empty captions in MediaWiki:Sidebar result in PHP errorshuji12:52, 24 January 2008

Status & tagging log