Fix single character access
authorSam Reed <reedy@users.mediawiki.org>
Thu, 22 Sep 2011 14:57:08 +0000 (14:57 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 22 Sep 2011 14:57:08 +0000 (14:57 +0000)
includes/Linker.php

index 4bb3dc6..84ede27 100644 (file)
@@ -1305,7 +1305,7 @@ class Linker {
                        # bug 7425
                        $target = trim( $target );
                        # Look at the first character
-                       if ( $target != '' && $target { 0 } === '/' ) {
+                       if ( $target != '' && $target[0] === '/' ) {
                                # / at end means we don't want the slash to be shown
                                $m = array();
                                $trailingSlashes = preg_match_all( '%(/+)$%', $target, $m );