Database: Remove the check for `sitecategories` table on Database Repair screen.
The table is no longer created by core as of WordPress 3.0, and support for global terms was removed in WordPress 6.1, so `$wpdb->sitecategories` is unset by default. This commit resolves a "passing null to non-nullable" deprecation notice on PHP 8.1: {{{ Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/class-wpdb.php on line 1804 }}} The `tables_to_repair` filter is available for plugins to readd the table or include any additional tables to repair. Follow-up to [14854], [14880], [54240]. Props ipajen, chiragrathod103, SergeyBiryukov. Fixes #57762. Built from https://develop.svn.wordpress.org/trunk@55421 git-svn-id: http://core.svn.wordpress.org/trunk@54954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
803426a023
commit
89f39839ab
|
@ -97,12 +97,6 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
|
|||
|
||||
$tables = $wpdb->tables();
|
||||
|
||||
// Sitecategories may not exist if global terms are disabled.
|
||||
$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->sitecategories ) );
|
||||
if ( is_multisite() && ! $wpdb->get_var( $query ) ) {
|
||||
unset( $tables['sitecategories'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters additional database tables to repair.
|
||||
*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.2-beta3-55420';
|
||||
$wp_version = '6.2-beta3-55421';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue