mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Don't block SET NAMES query. Props g30rg3x for the find. fixes #5503 for 2.4
git-svn-id: http://svn.automattic.com/wordpress/trunk@6464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5118aa7b7d
commit
364e809c38
@ -76,11 +76,12 @@ class wpdb {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->ready = true;
|
||||
|
||||
if ( !empty($this->charset) && version_compare(mysql_get_server_info(), '4.1.0', '>=') )
|
||||
$this->query("SET NAMES '$this->charset'");
|
||||
|
||||
$this->select($dbname);
|
||||
$this->ready = true;
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
@ -113,6 +114,7 @@ class wpdb {
|
||||
*/
|
||||
function select($db) {
|
||||
if (!@mysql_select_db($db, $this->dbh)) {
|
||||
$this->ready = false;
|
||||
$this->bail("
|
||||
<h1>Can’t select database</h1>
|
||||
<p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>$db</code> database.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user