diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 31604329bf..244cdc45d7 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -176,8 +176,10 @@ switch($step) { // We'll fail here if the values are no good. require_wp_db(); - if ( !empty($wpdb->error) ) - wp_die($wpdb->error->get_error_message()); + if ( ! empty( $wpdb->error ) ) { + $back = '

Try Again

'; + wp_die( $wpdb->error->get_error_message() . $back ); + } // Fetch or generate keys and salts. $no_api = isset( $_POST['noapi'] ); diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 7814c9dde1..c03deb1d3d 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1044,7 +1044,11 @@ class wpdb {

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

"/*/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 + // 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 will handle. + if ( defined( 'WP_SETUP_CONFIG' ) ) + return; + die(); }