r39410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39409‎ | r39410 | r39411 >
Date:15:56, 15 August 2008
Author:tstarling
Status:old
Tags:
Comment:
Avoid notice when no categories are present
Modified paths:
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -336,7 +336,11 @@
337337 global $wgOut;
338338 $wgOut->addCategoryLinks($output->getCategories());
339339 $cats = $wgOut->getCategoryLinks();
340 - $out = $this->tidy( implode( ' ', $cats['normal'] ) );
 340+ if ( isset( $cats['normal'] ) ) {
 341+ $out = $this->tidy( implode( ' ', $cats['normal'] ) );
 342+ } else {
 343+ $out = '';
 344+ }
341345 }
342346
343347 $result = $this->tidy($result);

Status & tagging log