Set error if there is a problem connecting to the DB. Props skeltoac and Potter_System. fixes #5495

git-svn-id: https://develop.svn.wordpress.org/trunk@6426 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-12-20 02:10:09 +00:00
parent 94618e5837
commit 1671feadfc
3 changed files with 21 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ define('WPINC', 'wp-includes');
require_once('../wp-includes/compat.php');
require_once('../wp-includes/functions.php');
require_once('../wp-includes/classes.php');
if (!file_exists('../wp-config-sample.php'))
wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
@@ -164,6 +165,9 @@ 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());
$handle = fopen('../wp-config.php', 'w');
foreach ($configFile as $line_num => $line) {