[wp-trac] [WordPress Trac] #55121: classic widgets with no settings won't show up in 5.9
WordPress Trac
noreply at wordpress.org
Fri Feb 18 00:11:13 UTC 2022
#55121: classic widgets with no settings won't show up in 5.9
----------------------------+-----------------------
Reporter: joncampbell | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.9.2
Component: Widgets | Version: 5.9
Severity: normal | Resolution:
Keywords: has-patch php8 | Focuses:
----------------------------+-----------------------
Comment (by jrf):
Let me suggest a slightly different path (which I still don't agree with,
but seems I'm fighting a losing battle against foolhardiness):
* Update any and all developer docs/handbooks propagating the incorrect
implementation of `WP_Widget` to show better code samples and to get rid
of the incorrect code pattern.
* Do **NOT** change the return type to include `null`. `array|false` is
the documented expected type as per the above, so let's keep it that way.
* Add a `_doing_it_wrong()` notice for when `null`is received, as plugins
should still be fixed for this incorrect implementation.
* Work around a received `null` value.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55121#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list