WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 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 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 @Viper007Bond5 years ago

I'm talking about this:

foreach ( $wp_taxonomies as $tax ) {

comment:2 @nacin5 years ago

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

@wojtek.szkutnik5 years ago

comment:3 @wojtek.szkutnik5 years ago

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

Done.

comment:4 @nacin5 years ago

  • Milestone changed from Awaiting Triage to 3.1

comment:5 @markjaquith5 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.