[wp-trac] [WordPress Trac] #22192: update_option() strict checks can cause false negatives

WordPress Trac noreply at wordpress.org
Thu Oct 5 16:13:54 UTC 2023


#22192: update_option() strict checks can cause false negatives
--------------------------------------+--------------------------
 Reporter:  nacin                     |       Owner:  mukesh27
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.4
Component:  Options, Meta APIs        |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by flixos90):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56788" 56788]:
 {{{
 #!CommitTicketReference repository="" revision="56788"
 Options, Meta APIs: Fix minor compatibility issue with `update_option()`
 change.

 When calling `update_option()` with value `false` on a non-existent
 option, prior to [56681] the function would have returned `false` and not
 stored the value in the database, since the given value was the same as
 the default.

 The aforementioned changeset broke that promise with good intention,
 however this particular change was a backward compatibility break and
 therefore is resolved here.

 Props mukesh27, costdev.
 Fixes #22192.
 }}}

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


More information about the wp-trac mailing list