Page MenuHomePhabricator

open function tries to send query even if there is no connection
Closed, ResolvedPublic

Description

Author: wiki

Description:
the function tries to make a connection and check if this was successfull. If
not, it reports an error using "wfDebug".
So far ok.
Problem: even if connection wasn't successfull it will triy to send "SET NAMES
utf8" to the server, which throws an exception.

Solution: only send if connection successfull, in other case it makes no sens...

if ( !$success ) {

$this->reportConnectionError();

} else {

global $wgDBmysql5;
if( $wgDBmysql5 ) {
  // Tell the server we're communicating with it in UTF-8.
  // This may engage various charset conversions.
  $this->query( 'SET NAMES utf8' );
}

}

Result: Installation successfull!


Version: 1.7.x
Severity: trivial
Platform: PC

Details

Reference
bz7312

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:28 PM
bzimport set Reference to bz7312.
bzimport added a subscriber: Unknown Object (MLST).