From 2071bf880e33dcc5ac2bada9ab2a8c893aacdd9c Mon Sep 17 00:00:00 2001 From: lupo Date: Fri, 16 Nov 2012 13:52:55 +0100 Subject: [PATCH] (bug 41146) DatabaseOracle no more rely on mbstring DatabaseOracle class has been using mb_check_encoding which might not always be available. We now rely on the StringUtils::isUtf8() method implemented by I4cf4dfe2. Change-Id: I5a9ffa23e3e738e4886d61e85974b0af25058308 --- includes/db/DatabaseOracle.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index aa4da0fedf..2f9a05ce0e 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -318,7 +318,7 @@ class DatabaseOracle extends DatabaseBase { protected function doQuery( $sql ) { wfDebug( "SQL: [$sql]\n" ); - if ( !mb_check_encoding( $sql ) ) { + if ( !StringUtils::isUtf8( $sql ) ) { throw new MWException( "SQL encoding is invalid\n$sql" ); } @@ -1116,7 +1116,7 @@ class DatabaseOracle extends DatabaseBase { if ( $col_type == 'CLOB' ) { $col = 'TO_CHAR(' . $col . ')'; $val = $wgContLang->checkTitleEncoding( $val ); - } elseif ( $col_type == 'VARCHAR2' && !mb_check_encoding( $val ) ) { + } elseif ( $col_type == 'VARCHAR2' ) { $val = $wgContLang->checkTitleEncoding( $val ); } } -- 2.20.1