r98228 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98227‎ | r98228 | r98229 >
Date:16:15, 27 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix character access
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -1367,7 +1367,7 @@
13681368 $from = ' FROM ' . implode( ',', $this->tableNamesWithAlias( $table ) );
13691369 }
13701370 } elseif ( $table != '' ) {
1371 - if ( $table { 0 } == ' ' ) {
 1371+ if ( $table[0] == ' ' ) {
13721372 $from = ' FROM ' . $table;
13731373 } else {
13741374 $from = ' FROM ' . $this->tableName( $table );
@@ -3127,7 +3127,7 @@
31283128 continue;
31293129 }
31303130
3131 - if ( '-' == $line { 0 } && '-' == $line { 1 } ) {
 3131+ if ( '-' == $line[0] && '-' == $line[1] ) {
31323132 continue;
31333133 }
31343134
@@ -3142,7 +3142,7 @@
31433143 }
31443144 }
31453145 elseif ( !$dollarquote ) {
3146 - if ( ';' == $line { $sl } && ( $sl < 2 || ';' != $line { $sl - 1 } ) ) {
 3146+ if ( ';' == $line[$sl] && ( $sl < 2 || ';' != $line[$sl - 1] ) ) {
31473147 $done = true;
31483148 $line = substr( $line, 0, $sl );
31493149 }

Sign-offs

UserFlagDate
Krinkleinspected16:46, 27 September 2011

Status & tagging log