Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30109 closed defect (bug) (invalid)

Inconsistent args type passed to Walker's start_el() method

Reported by: howardtw's profile howardtw Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: General Keywords:
Focuses: Cc:

Description

According to the doc [1], all args should be an array

start_lvl( &$output, $depth = 0, $args = array() ) 
end_lvl( &$output, $depth = 0, $args = array() ) 
start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) 

But in wp-admin/includes/nav-menu.php, object is being passed instead of array

  28     /**
  29      * @see Walker::start_el()                                                                                                                                                                                                        
  30      * @since 3.0.0
  31      *
  32      * @param string $output Passed by reference. Used to append additional content.
  33      * @param object $item Menu item data object.
  34      * @param int $depth Depth of menu item. Used for padding.
  35      * @param object $args
  36      */
  37     function start_el(&$output, $item, $depth, $args) {



[1] http://codex.wordpress.org/Class_Reference/Walker

Change History (1)

#1 @jeremyfelt
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @howardtw, thanks for filing a ticket. It looks like the docs for this were updated a few releases ago in 3.7 via [25641]

Note: See TracTickets for help on using tickets.