From 6f4f3aa934b6bab97facb3c4eafc0292fcb9ef09 Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 7 Jan 2025 15:42:25 +0000 Subject: [PATCH] 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 --- wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index e766c7782f..a01d19923c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.