Make WordPress Core

Changeset 49452


Ignore:
Timestamp:
10/30/2020 05:50:25 PM (4 years ago)
Author:
whyisjake
Message:

Upgrade/Install: During the install process, add additional checking for exising tables.

If reinstalling WordPress, there is a condition where tables would exist in the database. Ensures that when that is the case, the install process can carry along without issue.

Fixes #51676.

Props xknown, garubi, mukesh27, desrosj, johnbillion, metalandcoffee, davidbaumwald, whyisjake.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r49386 r49452  
    17581758
    17591759        $described_table = $wpdb->get_results( "DESCRIBE $table;" );
    1760         if ( is_array( $described_table ) && count( $described_table ) === 0 ) {
     1760        if (
     1761            ( ! $described_table && empty( $wpdb->last_error ) ) ||
     1762            ( is_array( $described_table ) && 0 === count( $described_table ) )
     1763        ) {
    17611764            continue;
    17621765        }
Note: See TracChangeset for help on using the changeset viewer.