Open Zodiac1978 opened 2 weeks ago
The function call to mysqli_get_client_info
was used (until WordPress 6.5) in the method get_test_utf8mb4_support
of the WP_Site_Health
class. But in this class this method was removed for WordPress 6.6.
https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-site-health.php
Because WordPress 6.6 is not released yet, it is still shown in the documentation (just search for get_test_utf8mb4_support
and you will find it):
https://developer.wordpress.org/reference/classes/wp_site_health/#source
This function was removed with this commit: https://github.com/WordPress/WordPress/commit/78d729602e11dd251b434124969be8c6d6922c8f
Ticket: https://core.trac.wordpress.org/ticket/60096 (Milestone 6.6) Changeset: https://core.trac.wordpress.org/changeset/57926
This explains why there is a fatal error. As mysqli_get_client_info
does not work with a SQLite database.
Unsure how to proceed here. This function is already removed, so this fatal error will disappear with WordPress 6.6.
I don't know if this is something you want to backport. If yes, this would need a safeguard, to check if there is a MySQL/MariaDB or a SQLite database.
To prove my findings. Playground with WordPress 6.6 (beta 3 at the moment) is not having this error anymore: https://playground.wordpress.net/?php=8.0&wp=beta&storage=none
Steps to reproduce:
Here are the logs:
Not sure what is causing this ... but maybe it has to do with
$wpdb->get_var( 'SELECT VERSION()' );
not working on SQLite. https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-site-health.php#L212We could polyfill this with a user defined function. More ideas here: https://stackoverflow.com/questions/9646353/how-to-find-database-file-version