#44770 closed defect (bug) (fixed)
Customize: `option_{$option}` filter applied with a missing parameter
| Reported by: | dlh | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.0.3 |
| Component: | Customize | Version: | 4.4 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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.
Attachments (1)
Change History (12)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Good catch.