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:
parent
98cdd162b2
commit
d93dcaf75f
|
@ -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.' ) );
|
||||
|
|
Loading…
Reference in New Issue