[wp-trac] [WordPress Trac] #58425: Use wp_die in place of only die in `WP_Widget::widget()` (was: Use wp_die in place of only die)

WordPress Trac noreply at wordpress.org
Mon May 29 19:26:50 UTC 2023


#58425: Use wp_die in place of only die in `WP_Widget::widget()`
-------------------------+----------------------
 Reporter:  shakhari     |       Owner:  (none)
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Widgets      |     Version:  6.2.2
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |     Focuses:
-------------------------+----------------------
Changes (by swissspidy):

 * keywords:  changes-requested =>
 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Hello and welcome to WordPress Trac!

 This `die()` call in  `WP_Widget::widget()` is meant as a warning for
 developers that they need to extend the method in their subclass. Nowadays
 such a class method would be declared as `abstract`, but for historical
 reasons that is not the case here.

 Since it's a message meant for developers and not end users, there isn't
 really a need to use `wp_die()` here just because a linter says so.

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


More information about the wp-trac mailing list