From 8e7a6b298d84800c535fb4113160439424db992c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 14 Jun 2019 11:25:45 +0000 Subject: [PATCH] Menus: Set better default for `$args` parameter in `Walker_Nav_Menu` methods, to match the documented parameter type. Props trasweb. Fixes #47524. git-svn-id: https://develop.svn.wordpress.org/trunk@45537 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-walker-nav-menu.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/class-walker-nav-menu.php b/src/wp-includes/class-walker-nav-menu.php index 171243b1b9..06070ed0c8 100644 --- a/src/wp-includes/class-walker-nav-menu.php +++ b/src/wp-includes/class-walker-nav-menu.php @@ -50,7 +50,7 @@ class Walker_Nav_Menu extends Walker { * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ - public function start_lvl( &$output, $depth = 0, $args = array() ) { + public function start_lvl( &$output, $depth = 0, $args = null ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; @@ -89,7 +89,7 @@ class Walker_Nav_Menu extends Walker { * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ - public function end_lvl( &$output, $depth = 0, $args = array() ) { + public function end_lvl( &$output, $depth = 0, $args = null ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; @@ -115,7 +115,7 @@ class Walker_Nav_Menu extends Walker { * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $id Current item ID. */ - public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { + public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; @@ -259,7 +259,7 @@ class Walker_Nav_Menu extends Walker { * @param int $depth Depth of page. Not Used. * @param stdClass $args An object of wp_nav_menu() arguments. */ - public function end_el( &$output, $item, $depth = 0, $args = array() ) { + public function end_el( &$output, $item, $depth = 0, $args = null ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = '';