[wp-trac] [WordPress Trac] #31047: Option nonexistence should not be checked against false
WordPress Trac
noreply at wordpress.org
Wed Feb 18 19:13:45 UTC 2015
#31047: Option nonexistence should not be checked against false
-------------------------------------+---------------------------
Reporter: GregLone | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.2
Component: Options, Meta APIs | Version: 3.4
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------------
Changes (by boonebgorges):
* owner: => boonebgorges
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"31473"]:
{{{
#!CommitTicketReference repository="" revision="31473"
Respect 'default_option_' filters during early sanity checks in
`add_option()` and `update_option()`.
`add_option()` and `update_option()` both call `get_option()` to compare
the
value passed to the function with any existing value for the given option
name.
When a `'default_option_'` filter is in place to change the default value
of
an option, `add_option()` and `update_option()` ought to check against the
filtered value, rather than a hardcoded `false`, in order to determine
whether
a prior value exists.
Props GregLone, tyxla.
Fixes #31047.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31047#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list