Opened 4 years ago

Closed 4 years ago

#9709 closed defect (bug) (fixed)

is_active_widget() nested logic is broken

Reported by: DD32 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)

9709.diff (1.4 KB) - added by DD32 4 years ago.

Download all attachments as: .zip

Change History (3)

DD324 years ago

comment:1   DD324 years ago

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

  • 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].

Note: See TracTickets for help on using tickets.