Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#31257 closed enhancement (fixed)

Variable initialized with value of inappropriate type

Reported by: ipm-frommen Owned by: SergeyBiryukov
Priority: normal Milestone: 4.2
Component: Administration Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Everywhere in the _wp_menu_output function, the $submenu_items variable is treated like an array; so why not initialize it with array(), instead of false?

There are several ! empty( $submenu_items ) checks, and these work perfectly fine with $submenu_items being an empty array.

Attachments (1)

31257.patch (528 bytes ) - added by ipm-frommen 11 years ago.

Download all attachments as: .zip

Change History (4)

@ipm-frommen
11 years ago

#1 @ipm-frommen
11 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
11 years ago

  • Component MenusAdministration
  • Focuses template removed
  • Milestone Awaiting Review4.2

#3 @SergeyBiryukov
11 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 31364:

In _wp_menu_output(), $submenu_items is an array and should be initialized as such.

props ipm-frommen.
fixes #31257.

Note: See TracTickets for help on using tickets.