WordPress.org

Make WordPress Core

Changeset 25333


Ignore:
Timestamp:
09/10/2013 11:37:23 PM (8 years ago)
Author:
wonderboymusic
Message:

Remove dead code in add_query_arg().

Props hakre, c3mdigital.
Fixes #16942.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r25320 r25333  
    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 . '?';
Note: See TracChangeset for help on using the changeset viewer.