File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,24 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) {
129129
130130 // Only report when a site has MyISAM tables to save bytes.
131131 if ( ! empty ( $ myisam_tables ) ) {
132- $ query ['myisam_tables ' ] = array_keys ( $ myisam_tables );
132+ $ all_unprefixed_tables = $ wpdb ->tables ( 'all ' , false );
133+
134+ // Including the table prefix is not necessary.
135+ $ unprefixed_myisam_tables = array_reduce (
136+ array_keys ( $ myisam_tables ),
137+ function ( $ carry , $ prefixed_myisam_table ) use ( $ all_unprefixed_tables ) {
138+ foreach ( $ all_unprefixed_tables as $ unprefixed ) {
139+ if ( str_ends_with ( $ prefixed_myisam_table , $ unprefixed ) ) {
140+ $ carry [] = $ unprefixed ;
141+ break ;
142+ }
143+ }
144+ return $ carry ;
145+ },
146+ array ()
147+ );
148+
149+ $ query ['myisam_tables ' ] = $ unprefixed_myisam_tables ;
133150 }
134151
135152 if ( function_exists ( 'gd_info ' ) ) {
You can’t perform that action at this time.
0 commit comments