From 02757de9d81bdaf7dd19319e89d08666e4bcf87e Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 10 Sep 2013 23:38:09 +0000 Subject: [PATCH] Remove dead code in `add_query_arg()`. Props hakre, c3mdigital. Fixes #16942. Built from https://develop.svn.wordpress.org/trunk@25333 git-svn-id: http://core.svn.wordpress.org/trunk@25295 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d5512cf70d..41428ce430 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -693,14 +693,8 @@ function add_query_arg() { } if ( strpos( $uri, '?' ) !== false ) { - $parts = explode( '?', $uri, 2 ); - if ( 1 == count( $parts ) ) { - $base = '?'; - $query = $parts[0]; - } else { - $base = $parts[0] . '?'; - $query = $parts[1]; - } + list( $base, $query ) = explode( '?', $uri, 2 ); + $base .= '?'; } elseif ( $protocol || strpos( $uri, '=' ) === false ) { $base = $uri . '?'; $query = '';