Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9709 closed defect (bug) (fixed)

is_active_widget() nested logic is broken

Reported by: dd32's profile DD32 Owned by:
Milestone: 2.8 Priority: normal
Severity: major Version: 2.8
Component: Widgets Keywords: has-patch
Focuses: 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 15 years ago.

Download all attachments as: .zip

Change History (3)

@DD32
15 years ago

#1 @DD32
15 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.

#2 @azaozz
15 years ago

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