r97816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97815‎ | r97816 | r97817 >
Date:14:57, 22 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix single character access
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1305,7 +1305,7 @@
13061306 # bug 7425
13071307 $target = trim( $target );
13081308 # Look at the first character
1309 - if ( $target != '' && $target { 0 } === '/' ) {
 1309+ if ( $target != '' && $target[0] === '/' ) {
13101310 # / at end means we don't want the slash to be shown
13111311 $m = array();
13121312 $trailingSlashes = preg_match_all( '%(/+)$%', $target, $m );

Status & tagging log