use FALSE to designate lack of user-supplied URL in *_query_arg() funcs. fixes #4465 for 2.3 (trunk)
git-svn-id: http://svn.automattic.com/wordpress/trunk@5705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
99f0971b73
commit
e211aa64e7
|
@ -564,12 +564,12 @@ add_query_arg(associative_array, oldquery_or_uri)
|
||||||
function add_query_arg() {
|
function add_query_arg() {
|
||||||
$ret = '';
|
$ret = '';
|
||||||
if ( is_array(func_get_arg(0)) ) {
|
if ( is_array(func_get_arg(0)) ) {
|
||||||
if ( @func_num_args() < 2 || '' == @func_get_arg(1) )
|
if ( @func_num_args() < 2 || false === @func_get_arg(1) )
|
||||||
$uri = $_SERVER['REQUEST_URI'];
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
else
|
else
|
||||||
$uri = @func_get_arg(1);
|
$uri = @func_get_arg(1);
|
||||||
} else {
|
} else {
|
||||||
if ( @func_num_args() < 3 || '' == @func_get_arg(2) )
|
if ( @func_num_args() < 3 || false === @func_get_arg(2) )
|
||||||
$uri = $_SERVER['REQUEST_URI'];
|
$uri = $_SERVER['REQUEST_URI'];
|
||||||
else
|
else
|
||||||
$uri = @func_get_arg(2);
|
$uri = @func_get_arg(2);
|
||||||
|
@ -641,7 +641,7 @@ remove_query_arg(removekey, [oldquery_or_uri]) or
|
||||||
remove_query_arg(removekeyarray, [oldquery_or_uri])
|
remove_query_arg(removekeyarray, [oldquery_or_uri])
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function remove_query_arg($key, $query='') {
|
function remove_query_arg($key, $query=FALSE) {
|
||||||
if ( is_array($key) ) { // removing multiple keys
|
if ( is_array($key) ) { // removing multiple keys
|
||||||
foreach ( (array) $key as $k )
|
foreach ( (array) $key as $k )
|
||||||
$query = add_query_arg($k, FALSE, $query);
|
$query = add_query_arg($k, FALSE, $query);
|
||||||
|
|
Loading…
Reference in New Issue