WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#13936 closed defect (bug) (fixed)

$wp_taxonomies should be cast as an array in /wp-admin/menu.php

Reported by: Viper007Bond Owned by:
Milestone: 3.1 Priority: lowest
Severity: minor Version:
Component: General Keywords: has-patch gsoc
Focuses: Cc:

Description

Always best to cast variables to an array when running them through foreach(), otherwise you can get warnings (which I'm currently getting due to a plugin's usage of the file).

Attachments (1)

13936.diff (1.2 KB) - added by wojtek.szkutnik 4 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Viper007Bond4 years ago

I'm talking about this:

foreach ( $wp_taxonomies as $tax ) {

comment:2 nacin4 years ago

I'm thinking all direct references to $wp_taxonomies should be replaced with get_taxonomies().

wojtek.szkutnik4 years ago

comment:3 wojtek.szkutnik4 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch gsoc added; needs-patch removed

Done.

comment:4 nacin4 years ago

  • Milestone changed from Awaiting Triage to 3.1

comment:5 markjaquith4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16695]) Use get_taxonomies() when iterating taxonomies for menus. props wojtek.szkutnik. fixes #13936

Note: See TracTickets for help on using tickets.