Don't die inside db_connect() if connection fails. Let dead_db() handle it. fixes #16640 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@17546 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-03-23 19:57:35 +00:00
parent fd76a68a2d
commit 04aea0e128
1 changed files with 1 additions and 6 deletions

View File

@ -1048,12 +1048,7 @@ class wpdb {
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
// If show errors is disabled then we need to die anyway as we don't have a working DB connection
// unless we're trying to test the initial connection, in which case setup-config.php/install.php will handle.
if ( defined( 'WP_SETUP_CONFIG' ) || defined( 'WP_INSTALLING' ) )
return;
die();
return;
}
$this->set_charset( $this->dbh );