diff --git a/wp-admin/maint/repair.php b/wp-admin/maint/repair.php index 7d8c0b9cb8..6daa5d5283 100644 --- a/wp-admin/maint/repair.php +++ b/wp-admin/maint/repair.php @@ -32,6 +32,9 @@ if ( !defined('WP_ALLOW_REPAIR') ) { $okay = true; $tables = $wpdb->tables(); + // Sitecategories may not exist if global terms are disabled. + if ( is_multisite() && ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->sitecategories'" ) ) + unset( $tables['sitecategories'] ); $tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Return tables with table prefixes. // Loop over the tables, checking and repairing as needed. foreach ( $tables as $table ) {