WordPress.org

Make WordPress Core

Changeset 33597


Ignore:
Timestamp:
08/09/15 02:21:11 (2 years ago)
Author:
dd32
Message:

Upgrade: Skip the sitecategories table when it doesn't exist (Global Terms is disabled).
Props nofearinc, obenland, SergeyBiryukov, and pento.
Fixes #33206

File:
1 edited

Legend:

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

    r33212 r33597  
    16861686            $tables = $wpdb->tables( 'global' ); 
    16871687 
     1688            // sitecategories may not exist. 
     1689            if ( ! $this->get_var( "SHOW TABLES LIKE '{$tables['sitecategories']}'" ) ) { 
     1690                unset( $tables['sitecategories'] ); 
     1691            } 
     1692 
    16881693            foreach ( $tables as $table ) { 
    16891694                maybe_convert_table_to_utf8mb4( $table ); 
     
    17091714 
    17101715            $tables = $wpdb->tables( 'global' ); 
     1716 
     1717            // sitecategories may not exist. 
     1718            if ( ! $this->get_var( "SHOW TABLES LIKE '{$tables['sitecategories']}'" ) ) { 
     1719                unset( $tables['sitecategories'] ); 
     1720            } 
    17111721 
    17121722            foreach ( $tables as $table ) { 
Note: See TracChangeset for help on using the changeset viewer.