[wp-trac] [WordPress Trac] #44770: Customize: `option_{$option}` filter applied with a missing parameter
WordPress Trac
noreply at wordpress.org
Fri Aug 10 16:57:10 UTC 2018
#44770: Customize: `option_{$option}` filter applied with a missing parameter
--------------------------+-----------------------------
Reporter: dlh | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.4
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
`WP_Customize_Widgets::capture_filter_pre_get_option()` applies the
`option_{$option}` filter to the captured value, but without the second
`$option` parameter added in WordPress 4.4.
The missing parameter has the potential to generate fatal errors in PHP
7.1 and above from uncaught `ArgumentCountError` exceptions if a function
is hooked to the filter that accepts both parameters.
The attached patch would add the second parameter to the `apply_filters()`
call.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44770>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list