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

WordPress Trac noreply at wordpress.org
Fri Jan 4 20:29:46 UTC 2019


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

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44392" 44392]:
 {{{
 #!CommitTicketReference repository="" revision="44392"
 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()`.

 Props flixos90.

 Merges [43578] to the 5.0 branch.
 Fixes #44809.
 }}}

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


More information about the wp-trac mailing list