diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 87b9ce7cbc..2460aa8354 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -627,7 +627,7 @@ function add_query_arg() { } $ret = trim($ret, '?'); $ret = $protocol . $base . $ret . $frag; - $ret = trim($ret, '?'); + $ret = rtrim($ret, '?'); return $ret; }