Ticket #17923: 17923.3.patch
File 17923.3.patch, 1.1 KB (added by , 13 years ago) |
---|
-
wp-includes/functions.php
1428 1428 * @param mixed $param1 Either newkey or an associative_array 1429 1429 * @param mixed $param2 Either newvalue or oldquery or uri 1430 1430 * @param mixed $param3 Optional. Old query or uri 1431 * @param bool $encode Optional. If true, values will be rawurlencode()'d 1431 1432 * @return string New URL query string. 1432 1433 */ 1433 1434 function add_query_arg() { … … 1477 1478 $qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string 1478 1479 if ( is_array( func_get_arg( 0 ) ) ) { 1479 1480 $kayvees = func_get_arg( 0 ); 1481 if ( true === @func_get_arg( 3 ) ) 1482 $kayvees = array_map( 'rawurlencode', $kayvees ); 1480 1483 $qs = array_merge( $qs, $kayvees ); 1481 1484 } else { 1482 1485 $qs[func_get_arg( 0 )] = func_get_arg( 1 ); 1486 if ( true === @func_get_arg( 3 ) ) 1487 $qs[func_get_arg( 0 )] = rawurlencode( $qs[func_get_arg( 0 )] ); 1483 1488 } 1484 1489 1485 1490 foreach ( (array) $qs as $k => $v ) {