[wp-trac] [WordPress Trac] #37010: Remove early exits from `WP_Customize_Setting::validate()` on `WP_Error` or `null`

WordPress Trac noreply at wordpress.org
Sun Jun 12 20:31:44 UTC 2016


#37010: Remove early exits from `WP_Customize_Setting::validate()` on `WP_Error` or
`null`
-------------------------+------------------------------
 Reporter:  dlh          |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Customize    |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by westonruter):

 @dlh Thanks for raising this. The reason why
 `WP_Customize_Setting::validate()` is short-circuiting is because if
 `WP_Error` is passed in, then we basically have no additional context for
 what we could amend to this `WP_Error` instance. In other words, the
 setting `$value` wasn't passed in, so we can't look at it to do any
 validation. Right?

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


More information about the wp-trac mailing list