From 4260bf8b169458d28525d02e27847b7c9e7b505b Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 16 Dec 2005 08:04:41 +0000 Subject: [PATCH] Populate PHP_SELF from REQUEST_URI if blank. git-svn-id: http://svn.automattic.com/wordpress/trunk@3319 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/vars.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 53b8d4d9b..d80cb99a6 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -3,7 +3,7 @@ // On which page are we ? $PHP_SELF = $_SERVER['PHP_SELF']; if ( empty($PHP_SELF) ) - $PHP_SELF = $_SERVER["REQUEST_URI"]; + $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) { $pagenow = $self_matches[1];