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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-03-23 19:57:35 +00:00
parent d9abef8ea3
commit c1da7bbb0b
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 );