WordPress.org

Make WordPress Core

Ticket #33206: 33206.3.diff

File 33206.3.diff, 867 bytes (added by dd32, 4 years ago)

untested; based off of nofearinc's patch

  • wp-admin/includes/upgrade.php

    diff --git wp-admin/includes/upgrade.php wp-admin/includes/upgrade.php
    index f13c458..7d30931 100644
    function upgrade_network() { 
    16851685
    16861686                        $tables = $wpdb->tables( 'global' );
    16871687
     1688                        // Sitecategories may not exist if global terms are disabled.
     1689                        if ( is_multisite() && ! global_terms_enabled() )
     1690                                unset( $tables['sitecategories'] );
     1691
    16881692                        foreach ( $tables as $table ) {
    16891693                                maybe_convert_table_to_utf8mb4( $table );
    16901694                        }
    function upgrade_network() { 
    17091713
    17101714                        $tables = $wpdb->tables( 'global' );
    17111715
     1716                        // Sitecategories may not exist if global terms are disabled.
     1717                        if ( is_multisite() && ! global_terms_enabled() )
     1718                                unset( $tables['sitecategories'] );
     1719
    17121720                        foreach ( $tables as $table ) {
    17131721                                maybe_convert_table_to_utf8mb4( $table );
    17141722                        }