[wp-trac] [WordPress Trac] #62280: Test tool and unit test improvements for 6.8
WordPress Trac
noreply at wordpress.org
Tue Jan 7 15:40:34 UTC 2025
#62280: Test tool and unit test improvements for 6.8
------------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.8
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+---------------------
Comment (by desrosj):
In [changeset:"59583" 59583]:
{{{
#!CommitTicketReference repository="" revision="59583"
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.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62280#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list