Avoid notice when no categories are present
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 15 Aug 2008 15:56:48 +0000 (15:56 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 15 Aug 2008 15:56:48 +0000 (15:56 +0000)
maintenance/parserTests.inc

index ba83497..01409c1 100644 (file)
@@ -336,7 +336,11 @@ class ParserTest {
                                global $wgOut;
                                $wgOut->addCategoryLinks($output->getCategories());
                                $cats = $wgOut->getCategoryLinks();
-                               $out = $this->tidy( implode( ' ', $cats['normal'] ) );
+                               if ( isset( $cats['normal'] ) ) {
+                                       $out = $this->tidy( implode( ' ', $cats['normal'] ) );
+                               } else {
+                                       $out = '';
+                               }
                        }
 
                        $result = $this->tidy($result);