r98971 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98970‎ | r98971 | r98972 >
Date:01:42, 5 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Check if $browseLinks is an array as CologneBlue does
Modified paths:
  • /branches/wmf/1.18wmf1/skins/Standard.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/skins/Standard.php
@@ -109,11 +109,13 @@
110110 foreach ( $bar as $browseLinks ) {
111111 if ( $barnumber > 1 ) {
112112 $s .= "\n<hr class='sep' />";
113 - }
114 - foreach ( $browseLinks as $link ) {
115 - if ( $link['text'] != '-' ) {
116 - $s .= "<a href=\"{$link['href']}\">" .
117 - htmlspecialchars( $link['text'] ) . '</a>' . $sep;
 113+ }
 114+ if ( is_array( $browseLinks ) ) {
 115+ foreach ( $browseLinks as $link ) {
 116+ if ( $link['text'] != '-' ) {
 117+ $s .= "<a href=\"{$link['href']}\">" .
 118+ htmlspecialchars( $link['text'] ) . '</a>' . $sep;
 119+ }
118120 }
119121 }
120122 if ( $barnumber == 1 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r98972Ported in r98971 from deploymentaaron01:45, 5 October 2011
r100373REL1_18: MFT r98962, r98971, r99004, r99065reedy20:56, 20 October 2011

Status & tagging log