Skip to content

Commit

Permalink
Fixes #7028 PHP Notice: Undefined property: stdClass::$table_name whe…
Browse files Browse the repository at this point in the history
…n enable database options on apache server (#7031)
  • Loading branch information
Khadreal authored Oct 17, 2024
1 parent f03ae70 commit 3c774bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/Engine/Admin/Database/OptimizationProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function task( $item ) {
}
break;
case 'database_optimize_tables':
$query = $wpdb->get_results( "SELECT table_name, data_free FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "' and Engine <> 'InnoDB' and data_free > 0" );
$query = $wpdb->get_results( "SELECT table_name AS table_name, data_free AS data_free FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "' and Engine <> 'InnoDB' and data_free > 0" );
if ( $query ) {
$number = 0;
foreach ( $query as $table ) {
Expand Down

0 comments on commit 3c774bb

Please sign in to comment.