WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#47409 closed enhancement (wontfix)

variable in foreach is used without validation.

Reported by: priyankkpatel Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.2.1
Component: Widgets Keywords: has-patch
Focuses: administration Cc:
PR Number:

Description

variable in foreach is used without checking whether it is array and not empty.

Attachments (2)

47409.diff (1.8 KB) - added by priyankkpatel 6 months ago.
Patch for wp-admin/widgets.php
47409.patch (1.6 KB) - added by dkarfa 6 months ago.

Download all attachments as: .zip

Change History (3)

@priyankkpatel
6 months ago

Patch for wp-admin/widgets.php

@dkarfa
6 months ago

#1 @SergeyBiryukov
6 months ago

  • Component changed from General to Widgets
  • Focuses administration added
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the patch! However, $theme_sidebars is defined as an array a few lines above, so there's no need for additional checks here.

Note: See TracTickets for help on using tickets.