Opened 4 years ago
Closed 4 years ago
#9709 closed defect (bug) (fixed)
is_active_widget() nested logic is broken
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Widgets | Version: | 2.8 |
| Severity: | major | Keywords: | has-patch |
| Cc: |
Description
In short, is_active_widget() isnt working as expected, Its not looping over all sidebars (and then widgets on each sidebar), mearly looping over each widget on the last sidebar.
The problem exists because there are no brackets on the sidebar loop, So its mearly looping over a if/continue..
I'm not sure how long this has been broken though.. I only noticed it because of a "$widgets is not set" notice on an clean install.
Attachments (1)
Change History (3)
- Resolution set to fixed
- Status changed from new to closed
Fixed this while working on the styling (didn't see this ticket) pretty much the same way. Had to remove the check for wp_inactive_widgets as it would list single widgets twice, as available and inactive. See [11160].

Could've gotten away with only adding braces on the foreach(), But for readability sake, i've braced them all and nested correctly.