[wp-trac] [WordPress Trac] #56468: sanitize_option() does not handle deprecated timezones correctly

WordPress Trac noreply at wordpress.org
Tue Aug 30 22:12:13 UTC 2022


#56468: sanitize_option() does not handle deprecated timezones correctly
-------------------------------------+---------------------
 Reporter:  jrf                      |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  Options, Meta APIs       |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by costdev):

 On the `wp_options` table:

 I wrote a test method with a couple of datasets. On the first dataset, it
 calls `update_option( 'howdy', 'admin' );`, then asserts that the value is
 `'admin'`.

 The first dataset passes, and the rest fail. So the options are reset
 between tests.

 == How?
 ''No drink or snack for you, this is quick!''

 [https://github.com/WordPress/wordpress-
 develop/blob/trunk/tests/phpunit/includes/abstract-testcase.php#L145
 Boop]: `tear_down()` contains the line: `$wpdb->query( 'ROLLBACK' );`.
 Commented out to confirm it's the specific point where it's cleared - and
 it is.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56468#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list