From 9f8a75e154cd2631c17a823899a30fbad26eca4e Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 15 Jul 2019 07:03:54 +0000 Subject: [PATCH] Code Modernisation: Revert [45624]. Changing the method signatures on `Walker` causes back compat issues. See #47678. git-svn-id: https://develop.svn.wordpress.org/trunk@45640 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-walker.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php index 4d35b093f5..6799d42f28 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 ) { + public function walk( $elements, $max_depth ) { + $args = array_slice( func_get_args(), 2 ); $output = ''; //invalid parameter or nothing to walk @@ -276,16 +276,16 @@ class Walker { * * @param array $elements * @param int $max_depth The maximum hierarchical depth. - * @param int $page_num The specific page number, beginning with 1. + * @param int $page_num The specific page number, beginning with 1. * @param int $per_page - * @param mixed ...$args Optional additional arguments. * @return string XHTML of the specified page of elements */ - public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) { + public function paged_walk( $elements, $max_depth, $page_num, $per_page ) { if ( empty( $elements ) || $max_depth < -1 ) { return ''; } + $args = array_slice( func_get_args(), 4 ); $output = ''; $parent_field = $this->db_fields['parent'];