Upgrade: Skip the sitecategories table when it doesn't exist (Global Terms is disabled).

Props nofearinc, obenland, SergeyBiryukov, and pento.
Fixes #33206


git-svn-id: https://develop.svn.wordpress.org/trunk@33597 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2015-08-09 02:21:11 +00:00
parent 2d6c10b842
commit 7ef82c235a

View File

@ -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 );
}