Closed kk6mrp closed 1 year ago
Is it possible to add a filter for this?
The checks for the database in Site Health could probably be filtered/removed/replaced to prevent such an error, I think so. In this case though, WP seems to be calling a function which has been removed as of PHP 7.
What version of WP are you running?
The latest version, 5.8.2.
I've added the following to hide the Site Health information for now, looking through class-wp-site-health.php
, it looks like it could be tricky to make the site health work well with the SQLite Integration.
// Remove Site Health Dashboard Widget
add_action('wp_dashboard_setup', 'themeprefix_remove_dashboard_widget' );
function themeprefix_remove_dashboard_widget() {
remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal' );
}
// Remove Site Health Sub Menu Item
add_action( 'admin_menu', 'remove_site_health_menu' );
function remove_site_health_menu(){
remove_submenu_page( 'tools.php','site-health.php' );
}
I just replaced the calls to mysql_get_client_info() with a static string '5.6.5'. The version string is checked for support of utf8mb4 and I think is mostly harmless. Similarly for mysql_get_serverinfo(). I'm running WP 6.0. Note the mysql versions of these and similar functions have been deprecated for a long while and replaced by mysqli_ and PDO versions.
This has been fixed in a recent release; going to the Site Health screen no longer raises a fatal error 👍
I'm getting this error when I try to open the Site Health menu under Tools. Is it possible to add a filter for this?