Fatal error: Uncaught TypeError: mysqli_num_fields(): Argument #1 ($result) must be of type mysqli_result, false given in /var/www/html/wp-includes/class-wpdb.php:3870
Stack trace:
#0 /var/www/html/wp-includes/class-wpdb.php(3870): mysqli_num_fields(false)
#1 /var/www/html/wp-includes/class-wpdb.php(785): wpdb->load_col_info()
#2 /var/www/html/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(230): wpdb->__get('col_info')
#3 /var/www/html/wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php(216): W3TC\DbCache_WpdbInjection_QueryCaching->query('SELECT \n\t`key`,...')
#4 /var/www/html/wp-includes/class-wpdb.php(3150): W3TC\DbCache_WpdbNew->query('SELECT \n\t`key`,...')
#5 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Database.php(1338): wpdb->get_results('SELECT \n\t`key`,...', 'ARRAY_A')
#6 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Cache.php(101): AIOSEO\Plugin\Common\Utils\Database->run()
#7 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Database.php(457): AIOSEO\Plugin\Common\Utils\Cache->get('db_schema')
#8 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Database.php(444): AIOSEO\Plugin\Common\Utils\Database->getAioseoTablesWithColumns()
#9 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Image/Image.php(59): AIOSEO\Plugin\Common\Utils\Database->columnExists('wp_aioseo_posts', 'image_scan_date')
#10 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Sitemap.php(90): AIOSEO\Plugin\Common\Sitemap\Image\Image->__construct()
#11 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(289): AIOSEO\Plugin\Common\Sitemap\Sitemap->__construct()
#12 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(106): AIOSEO\Plugin\AIOSEO->load()
#13 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(85): AIOSEO\Plugin\AIOSEO->init()
#14 /var/www/html/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(366): AIOSEO\Plugin\AIOSEO::instance()
#15 /var/www/html/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(98): aioseo()
#16 /var/www/html/wp-settings.php(589): include_once('/var/www/html/w...')
#17 /var/www/html/wp-config.php(139): require_once('/var/www/html/w...')
#18 /var/www/html/wp-load.php(50): require_once('/var/www/html/w...')
#19 /var/www/html/wp-blog-header.php(13): require_once('/var/www/html/w...')
#20 /var/www/html/index.php(17): require('/var/www/html/w...')
#21 {main}
thrown in /var/www/html/wp-includes/class-wpdb.php on line 3870