From fdb58876bbaec77c21d3979226b3c00d87f8e314 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 11 Jul 2019 11:47:05 +0200
Subject: [PATCH] Use spread operator in Walker::walk()

---
 src/wp-includes/class-wp-walker.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php
index 6799d42f28..1d60e28632 100644
--- a/src/wp-includes/class-wp-walker.php
+++ b/src/wp-includes/class-wp-walker.php
@@ -184,10 +184,10 @@ class Walker {
 	 *
 	 * @param array $elements  An array of elements.
 	 * @param int   $max_depth The maximum hierarchical depth.
+	 * @param mixed ...$args   Optional additional arguments.
 	 * @return string The hierarchical item output.
 	 */
-	public function walk( $elements, $max_depth ) {
-		$args   = array_slice( func_get_args(), 2 );
+	public function walk( $elements, $max_depth, ...$args ) {
 		$output = '';
 
 		//invalid parameter or nothing to walk
-- 
2.21.0.windows.1

