Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#47409 closed enhancement (wontfix)

variable in foreach is used without validation.

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

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 7 years ago.
Patch for wp-admin/widgets.php
47409.patch​ (1.6 KB ) - added by dkarfa 7 years ago.

Download all attachments as: .zip

Change History (3)

@priyankkpatel
7 years ago

Patch for wp-admin/widgets.php

@dkarfa
7 years ago

#1 @SergeyBiryukov
7 years ago

  • Component General → Widgets
  • Focuses administration added
  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → 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.