Ported in r98971 from deployment
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 5 Oct 2011 01:45:26 +0000 (01:45 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 5 Oct 2011 01:45:26 +0000 (01:45 +0000)
skins/Standard.php

index c3e189d..de63eab 100644 (file)
@@ -118,11 +118,13 @@ class StandardTemplate extends LegacyTemplate {
                foreach ( $bar as $browseLinks ) {
                        if ( $barnumber > 1 ) {
                                $s .= "\n<hr class='sep' />";
-                       } 
-                       foreach ( $browseLinks as $link ) {
-                               if ( $link['text'] != '-' ) {
-                                       $s .= "<a href=\"{$link['href']}\">" .
-                                               htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+                       }
+                       if ( is_array( $browseLinks ) ) {
+                               foreach ( $browseLinks as $link ) {
+                                       if ( $link['text'] != '-' ) {
+                                               $s .= "<a href=\"{$link['href']}\">" .
+                                                       htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+                                       }
                                }
                        }
                        if ( $barnumber == 1 ) {