[wp-trac] [WordPress Trac] #56468: sanitize_option() does not handle deprecated timezones correctly
WordPress Trac
noreply at wordpress.org
Mon Sep 19 17:44:09 UTC 2022
#56468: sanitize_option() does not handle deprecated timezones correctly
-------------------------------------------------+-------------------------
Reporter: jrf | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.1
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit- | Focuses:
tests commit |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
In [changeset:"54207" 54207]:
{{{
#!CommitTicketReference repository="" revision="54207"
Tests: Reset timezone-related options if the tests change them.
The `options` table is not explicitly reset after each test or test class,
so if an option is changed during a test, it should be reset to the
default value ''after'' the test.
This commit does so for those tests which did not have such resetting in
place yet, while one or more tests in the class ''do'' change the value of
the `timezone_string` option.
Note: The test suite executes a `ROLLBACK` query after each test, which
should reset the `options` table in theory, however that appears to not
always be enough, as some timezone-related tests can fail in a complete
test suite run, while not failing when run in isolation. This commit aims
to improve stability of the tests.
Follow-up to [45857] / #45821.
Props jrf, costdev.
See #56468.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56468#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list