From 6a4f2fbec8808fdaf6bd97b279209c406cee1a3d Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 23 Jan 2006 23:42:25 +0000 Subject: [PATCH] add_query_arg() fix from majelbstoat. fixes #2326 git-svn-id: http://svn.automattic.com/wordpress/trunk@3474 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2bd59fdd8..2fdf75bc0 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2043,7 +2043,10 @@ add_query_arg(associative_array, oldquery_or_uri) function add_query_arg() { $ret = ''; if ( is_array(func_get_arg(0)) ) { - $uri = @func_get_arg(1); + if ( @func_num_args() < 2 ) + $uri = $_SERVER['REQUEST_URI']; + else + $uri = @func_get_arg(1); } else { if ( @func_num_args() < 3 ) $uri = $_SERVER['REQUEST_URI'];