WordPress.org

Make WordPress Core

Changeset 41631


Ignore:
Timestamp:
09/28/2017 07:57:22 AM (3 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/setup-config.php

    r41335 r41631  
    277277        wp_die( $wpdb->error->get_error_message() . $tryagain_link );
    278278
     279    $errors = $wpdb->hide_errors();
    279280    $wpdb->query( "SELECT $prefix" );
     281    $wpdb->show_errors( $errors );
    280282    if ( ! $wpdb->last_error ) {
    281283        // MySQL was able to parse the prefix as a value, which we don't want. Bail.
Note: See TracChangeset for help on using the changeset viewer.