Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#47715 closed defect (bug) (fixed)

Customize: Widgets filter overwrites options with empty value

Reported by: dlh's profile dlh Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: has-patch
Focuses: Cc:

Description

\WP_Customize_Widgets::capture_filter_pre_update_option(), which is hooked to the pre_update_option filter, does not return a value when it attempts to return early, causing the filtered value to become null.

The attached patch ensures the filtered value is returned instead.

Attachments (1)

47715.diff (566 bytes) - added by dlh 5 years ago.

Download all attachments as: .zip

Change History (3)

@dlh
5 years ago

#1 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3

#2 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 45644:

Customize: In WP_Customize_Widgets::capture_filter_pre_update_option(), return the filtered value instead of null when bailing early for ignored options.

Props dlh.
Fixes #47715.

Note: See TracTickets for help on using tickets.