[wp-trac] [WordPress Trac] #59846: Reinstate the `wpdb::$use_mysqli` property
WordPress Trac
noreply at wordpress.org
Wed Nov 8 20:09:08 UTC 2023
#59846: Reinstate the `wpdb::$use_mysqli` property
---------------------------------------------+---------------------
Reporter: johnbillion | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4.1
Component: Database | Version: 6.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+---------------------
Comment (by rajinsharwar):
Manual Testing info, and error logging if the property is accessible by
the plugins.
{{{#!php
global $wpdb;
// Check if the $wpdb object is available, and error log accordingly
if (isset($wpdb) && is_object($wpdb)) {
if (property_exists($wpdb, 'use_mysqli')) {
$useMysqli = $wpdb->use_mysqli;
error_log('MySQLi driver is ' . ($useMysqli ? 'enabled' :
'disabled'));
} else {
error_log('$wpdb->use_mysqli property does not exist');
}
} else {
error_log('$wpdb object is not available');
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59846#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list