[wp-trac] [WordPress Trac] #44809: Safeguard `has_errors()` check in extra Customizer validation

WordPress Trac noreply at wordpress.org
Sun Aug 19 16:37:15 UTC 2018


#44809: Safeguard `has_errors()` check in extra Customizer validation
------------------------------+-----------------------
 Reporter:  flixos90          |       Owner:  flixos90
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  4.9.9
Component:  Customize         |     Version:  4.7
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------
Changes (by flixos90):

 * owner:  (none) => flixos90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"43578" 43578]:
 {{{
 #!CommitTicketReference repository="" revision="43578"
 Customize: Safeguard a check on the `customize_validate_{$setting_id}`
 filter value to ensure it is a `WP_Error`.

 While the filter is documented to only support a `WP_Error`, it has been a
 common practice to return true in a validation function if no errors have
 occurred. This was already caught when the same filter was executed in
 `WP_Customize_Setting`, it was however missing in
 `WP_Customize_Manager::validate_setting_values()`.

 Fixes #44809.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44809#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list