From dcd75531cb36fa2c6fad272e324e66aba29fbd5f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 16 Dec 2005 08:04:41 +0000 Subject: [PATCH] Populate PHP_SELF from REQUEST_URI if blank. git-svn-id: https://develop.svn.wordpress.org/trunk@3319 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 53b8d4d9be..d80cb99a64 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];