[wp-trac] [WordPress Trac] #20804: sanitize_option_* filter does not specify number of arguments
WordPress Trac
wp-trac at lists.automattic.com
Thu May 31 18:27:49 UTC 2012
#20804: sanitize_option_* filter does not specify number of arguments
----------------------------+-----------------------------
Reporter: chokladzingo | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.4
Severity: trivial | Keywords: has-patch
----------------------------+-----------------------------
register_setting() in wp-admin/includes/plugin.php adds a filter for each
option registered. When this filter is later run by the sanitize_option()
function the variables $value and $option are specified as arguments for
the callback function. Since number of arguments ($accepted_args) was not
specified when adding the filter in register_setting(), the $option
argument is not supplied to the callback function.
This is simply fixed by supplying the $accepted_args argument to
add_filter() in register_setting() and remove_filter() in
unregister_setting().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20804>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list