mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Database: Reinstate wpdb::$use_mysqli property.
Partial revert of [56475] to reinstate the private `wpdb::$use_mysqli` property and set to its default to `true`. This private property was / is accessible through the magic methods. Though Core's usage of this property was removed by [56475], plugins are using the property. Reinstating it resolves the BC break. Follow up to [56475]. Props jason_the_adams, joemcgill, johnbillion, johnjamesjacoby, jrf, rajinsharwar, renehermi. Fixes #59846. git-svn-id: https://develop.svn.wordpress.org/trunk@57089 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2130a90861
commit
8c2c762e23
@ -690,6 +690,21 @@ class wpdb {
|
||||
*/
|
||||
private $allow_unsafe_unquoted_parameters = true;
|
||||
|
||||
/**
|
||||
* Whether to use the mysqli extension over mysql. This is no longer used as the mysql
|
||||
* extension is no longer supported.
|
||||
*
|
||||
* Default true.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @since 6.4.0 This property was removed.
|
||||
* @since 6.4.1 This property was reinstated and its default value was changed to true.
|
||||
* The property is no longer used in core but may be accessed externally.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $use_mysqli = true;
|
||||
|
||||
/**
|
||||
* Whether we've managed to successfully connect at some point.
|
||||
*
|
||||
|
||||
@ -2469,4 +2469,17 @@ class Tests_DB extends WP_UnitTestCase {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This private property is no longer used but needs to be retained as it can be
|
||||
* accessed externally due to the `__get()` magic method.
|
||||
*
|
||||
* @ticket 59118
|
||||
* @ticket 59846
|
||||
*/
|
||||
public function test_use_mysqli_property_access() {
|
||||
global $wpdb;
|
||||
|
||||
$this->assertTrue( $wpdb->use_mysqli );
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user