mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Setup: Hide database errors while testing the table prefix.
If DB errors are shown during installation, the table prefix test will also show an error, even though we're deliberately trying to generate that error. Fixes #40655. git-svn-id: https://develop.svn.wordpress.org/trunk@41631 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -276,7 +276,9 @@ switch($step) {
|
||||
if ( ! empty( $wpdb->error ) )
|
||||
wp_die( $wpdb->error->get_error_message() . $tryagain_link );
|
||||
|
||||
$errors = $wpdb->hide_errors();
|
||||
$wpdb->query( "SELECT $prefix" );
|
||||
$wpdb->show_errors( $errors );
|
||||
if ( ! $wpdb->last_error ) {
|
||||
// MySQL was able to parse the prefix as a value, which we don't want. Bail.
|
||||
wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) );
|
||||
|
||||
Reference in New Issue
Block a user