Last modified: 2010-05-15 15:41:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T9312, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7312 - open function tries to send query even if there is no connection
open function tries to send query even if there is no connection
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.7.x
PC All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-13 14:20 UTC by Kako
Modified: 2010-05-15 15:41 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kako 2006-09-13 14:20:48 UTC
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!
Comment 1 Brion Vibber 2006-09-13 15:27:26 UTC
Fixed on trunk in r16503.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links