Make WordPress Core


Ignore:
Timestamp:
10/30/2020 06:26:24 PM (4 years ago)
Author:
whyisjake
Message:

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

This commit brings the changes in [49452] to the 5.3 branch.

If reinstalling WordPress, there is a condition where tables would exist in the database. Ensures that$

Fixes #51676.

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

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-includes/functions.php

    r49393 r49455  
    17081708
    17091709        $described_table = $wpdb->get_results( "DESCRIBE $table;" );
    1710         if ( is_array( $described_table ) && count( $described_table ) === 0 ) {
     1710        if (
     1711            ( ! $described_table && empty( $wpdb->last_error ) ) ||
     1712            ( is_array( $described_table ) && 0 === count( $described_table ) )
     1713        ) {
    17111714            continue;
    17121715        }
Note: See TracChangeset for help on using the changeset viewer.