Skip to content

Commit a963ab0

Browse files
committed
Remove dead code in add_query_arg().
Props hakre, c3mdigital. Fixes #16942. git-svn-id: https://develop.svn.wordpress.org/trunk@25333 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1a46a76 commit a963ab0

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/wp-includes/functions.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -693,14 +693,8 @@ function add_query_arg() {
693693
}
694694

695695
if ( strpos( $uri, '?' ) !== false ) {
696-
$parts = explode( '?', $uri, 2 );
697-
if ( 1 == count( $parts ) ) {
698-
$base = '?';
699-
$query = $parts[0];
700-
} else {
701-
$base = $parts[0] . '?';
702-
$query = $parts[1];
703-
}
696+
list( $base, $query ) = explode( '?', $uri, 2 );
697+
$base .= '?';
704698
} elseif ( $protocol || strpos( $uri, '=' ) === false ) {
705699
$base = $uri . '?';
706700
$query = '';

0 commit comments

Comments
 (0)