Make WordPress Core

Changeset 49456


Ignore:
Timestamp:
10/30/2020 06:27:45 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.2 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.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

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

    r49394 r49456  
    15681568
    15691569        $described_table = $wpdb->get_results( "DESCRIBE $table;" );
    1570         if ( is_array( $described_table ) && count( $described_table ) === 0 ) {
     1570        if (
     1571            ( ! $described_table && empty( $wpdb->last_error ) ) ||
     1572            ( is_array( $described_table ) && 0 === count( $described_table ) )
     1573        ) {
    15711574            continue;
    15721575        }
Note: See TracChangeset for help on using the changeset viewer.