Tests: Fix `explode()` error for old DB versions on PHP 8.1+.
On MySQL/MariaDB 5.5, the default value for `sql_mode` was a blank string. By itself this is not a problem. However, `$wpdb->get_var()` returns `null` when a variable has an empty value. One test method currently passes the result of `$wpdb->get_var( 'SELECT @@SESSION.sql_mode;' )` to `explode()` in order to reset the database to the pre-test method state. This causes an error when running PHP 8.1+, which deprecated the ability to pass `null` as a parameter of `explode()`. This edge case was undiscovered because these versions are not currently included in the automated testing matrix. See #62280. Built from https://develop.svn.wordpress.org/trunk@59583 git-svn-id: http://core.svn.wordpress.org/trunk@58969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cfee5c0868
commit
6f4f3aa934
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59582';
|
||||
$wp_version = '6.8-alpha-59583';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue