From 3a4e78f9bd42b9d80288368c3f52e6a1357f0825 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 28 Sep 2017 07:58:46 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@41631 git-svn-id: http://core.svn.wordpress.org/trunk@41466 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/setup-config.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index c1fe1eb808..e416931d00 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -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( __( 'ERROR: "Table Prefix" is invalid.' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 6775201b05..27f4c97a25 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41630'; +$wp_version = '4.9-alpha-41631'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.