mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user