Use [] instead of { } for accessing string characters
authorPlatonides <platonides@users.mediawiki.org>
Sun, 19 Jun 2011 21:05:26 +0000 (21:05 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 19 Jun 2011 21:05:26 +0000 (21:05 +0000)
includes/Title.php

index 1ec8454..ebbf1e1 100644 (file)
@@ -2596,7 +2596,7 @@ class Title {
 
                # Initial colon indicates main namespace rather than specified default
                # but should not create invalid {ns,title} pairs such as {0,Project:Foo}
-               if ( ':' == $dbkey { 0 } ) {
+               if ( ':' == $dbkey[0] ) {
                        $this->mNamespace = NS_MAIN;
                        $dbkey = substr( $dbkey, 1 ); # remove the colon but continue processing
                        $dbkey = trim( $dbkey, '_' ); # remove any subsequent whitespace