diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index da1e1ba6e5..86c6f9ade8 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -1685,6 +1685,11 @@ function upgrade_network() { $tables = $wpdb->tables( 'global' ); + // sitecategories may not exist. + if ( ! $this->get_var( "SHOW TABLES LIKE '{$tables['sitecategories']}'" ) ) { + unset( $tables['sitecategories'] ); + } + foreach ( $tables as $table ) { maybe_convert_table_to_utf8mb4( $table ); } @@ -1709,6 +1714,11 @@ function upgrade_network() { $tables = $wpdb->tables( 'global' ); + // sitecategories may not exist. + if ( ! $this->get_var( "SHOW TABLES LIKE '{$tables['sitecategories']}'" ) ) { + unset( $tables['sitecategories'] ); + } + foreach ( $tables as $table ) { maybe_convert_table_to_utf8mb4( $table ); }