[wp-trac] [WordPress Trac] #28158: WP_Widget_Factory does not validate that widget class is a WP_Widget

WordPress Trac noreply at wordpress.org
Thu May 8 12:13:25 UTC 2014


#28158: WP_Widget_Factory does not validate that widget class is a WP_Widget
---------------------------+----------------------
 Reporter:  carlalexander  |       Owner:
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Widgets        |     Version:  3.9
 Severity:  normal         |  Resolution:  wontfix
 Keywords:                 |     Focuses:
---------------------------+----------------------

Comment (by carlalexander):

 Replying to [comment:4 DrewAPicture]:
 > I think the point is that it's understood that `WP_Widget_Factory`
 expects a `WP_Widget` object here. And in choosing not to pass one, the
 fatal that gets tossed is the notification that there is developer error.
 This not really something you'd want fail silently, imo.

 This doesn't match the behaviour in `the_widget` which does fail silently.
 If anything, the silent validation in `the_widget` is not even worth
 anything since you're going to have had a fatal error before it even
 reaches that code.

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


More information about the wp-trac mailing list