Opened 3 years ago
Last modified 2 years ago
#14893 new defect (bug)
wp_inactive_widgets sidebar forgotten, then does notice in /wp-admin/widgets.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Warnings/Notices | Version: | 3.0.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
The 'wp_inactive_widgets' is not initalized but used later on.
Can be fixed easily by adding it while the array get's initialized.
Attachments (1)
Change History (7)
- Summary changed from wp_inactive_widgets sidebar forgotten, than does notice in /wp-admin/widgets.php to wp_inactive_widgets sidebar forgotten, then does notice in /wp-admin/widgets.php
comment:2
follow-up:
↓ 3
Denis-de-Bernardy — 3 years ago
Replying to Denis-de-Bernardy:
Mm, I'm suspecting the suggested patch will break some upgrade/backwards compatibility code we introduced around WP 2.8. It's better use isset() where needed to avoid the notices when there are any.
Can you please make that suspection concrete with the patch because I do not see the problem here.
Tons more here, for your reading pleasure: #9511. don't forget to look around in related tickets, and related to related tickets.
Alternatively, trust me a take this short short version at face value: the WP widgets API will blow up in your face on changes like the one you suggest, and it's better to add whatever isset() calls are needed until it's rewritten from the ground up.
comment:6
markjaquith — 2 years ago
- Milestone changed from Awaiting Review to Future Release
How many places would isset() checks be required to squash the notices? If it's just a handful, do that.

Mm, I'm suspecting the suggested patch will break some upgrade/backwards compatibility code we introduced around WP 2.8. It's better use isset() where needed to avoid the notices when there are any.