Make WordPress Core

Changeset 49453


Ignore:
Timestamp:
10/30/2020 05:54:48 PM (3 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.5 branch.

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.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

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

    r49377 r49453  
    17551755
    17561756        $described_table = $wpdb->get_results( "DESCRIBE $table;" );
    1757         if ( is_array( $described_table ) && count( $described_table ) === 0 ) {
     1757        if (
     1758            ( ! $described_table && empty( $wpdb->last_error ) ) ||
     1759            ( is_array( $described_table ) && 0 === count( $described_table ) )
     1760        ) {
    17581761            continue;
    17591762        }
Note: See TracChangeset for help on using the changeset viewer.