From 83b1f1e5cbc16713de925c9debb17415f9ade761 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Thu, 18 Jul 2019 06:19:59 +0200
Subject: [PATCH] Use spread operator in add_query_args()

---
 src/wp-includes/functions.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index a66b3fa406..65c01532bf 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -928,8 +928,7 @@ function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urle
  * @param string       $url   Optional. A URL to act upon.
  * @return string New URL query string (unescaped).
  */
-function add_query_arg() {
-	$args = func_get_args();
+function add_query_arg( ...$args ) {
 	if ( is_array( $args[0] ) ) {
 		if ( count( $args ) < 2 || false === $args[1] ) {
 			$uri = $_SERVER['REQUEST_URI'];
-- 
2.21.0.windows.1

