Basic support for the mysql_connect() new_link and client_flags arguments. props Otto42, fixes #19324.
git-svn-id: https://develop.svn.wordpress.org/trunk@21609 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a7111de3b5
commit
b15fec4e42
|
@ -1135,10 +1135,13 @@ class wpdb {
|
|||
|
||||
$this->is_mysql = true;
|
||||
|
||||
$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;
|
||||
$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
|
||||
|
||||
if ( WP_DEBUG ) {
|
||||
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
|
||||
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
} else {
|
||||
$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
|
||||
$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
}
|
||||
|
||||
if ( !$this->dbh ) {
|
||||
|
|
Loading…
Reference in New Issue