Entering invalid DB information causes WP installer to silently die()
|Reported by:||itsananderson||Owned by:|
If a user provides invalid database connection information (such as an invalid DB username or password) during the installation process, the WordPress installer exits without printing any sort of error message.
I dug around a bit in the source and it looks like the installer attempts connect to the database with the provided data, and if wpdb fails to connect, it wp_die()s the connection error.
The problem is that if there's a problem connecting to the DB, it never gets back to setup-config.php, because $wpdb->show_errors is set to false, so $wpdb->db_connect() will die() without printing any error message.
The fix might actually be as simple as 1) setting $wpdb->show_errors to true during the install process or 2) not die()ing immediately if there's a connection problem. Another option would be to check whether WP_INSTALLING is defined before die()ing.