r90420 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90419‎ | r90420 | r90421 >
Date:21:05, 19 June 2011
Author:platonides
Status:ok
Tags:
Comment:
Use [] instead of { } for accessing string characters
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2596,7 +2596,7 @@
25972597
25982598 # Initial colon indicates main namespace rather than specified default
25992599 # but should not create invalid {ns,title} pairs such as {0,Project:Foo}
2600 - if ( ':' == $dbkey { 0 } ) {
 2600+ if ( ':' == $dbkey[0] ) {
26012601 $this->mNamespace = NS_MAIN;
26022602 $dbkey = substr( $dbkey, 1 ); # remove the colon but continue processing
26032603 $dbkey = trim( $dbkey, '_' ); # remove any subsequent whitespace

Status & tagging log