From ec7782fe97f7e631176793d9cfa4bb4f0909f743 Mon Sep 17 00:00:00 2001 From: Jure Kajzer Date: Sat, 20 Feb 2010 18:27:00 +0000 Subject: [PATCH] tableName has to be encoded before field type checking --- includes/db/DatabaseOracle.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 0cfcaa6a24..9778b4cbb5 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -283,9 +283,9 @@ class DatabaseOracle extends DatabaseBase { function doQuery( $sql ) { wfDebug( "SQL: [$sql]\n" ); - if ( !mb_check_encoding( $sql ) ) { - throw new MWException( "SQL encoding is invalid\n$sql" ); - } + if ( !mb_check_encoding( $sql ) ) { + throw new MWException( "SQL encoding is invalid\n$sql" ); + } // handle some oracle specifics // remove AS column/table/subquery namings @@ -1024,6 +1024,7 @@ class DatabaseOracle extends DatabaseBase { if (is_array($table)) { $table = array_map( array( &$this, 'tableName' ), $table ); } + $table = $this->tableName($table); $conds2 = array(); $conds = ($conds != null && !is_array($conds)) ? array($conds) : $conds; -- 2.20.1