From 0577003eb9a5b5f20c4b6726bbd83933b791146b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 29 Nov 2005 02:33:25 +0000 Subject: [PATCH] If PHP_SELF is empty, use REQUEST_URI when determining pagenow. git-svn-id: https://develop.svn.wordpress.org/trunk@3231 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/vars.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/vars.php b/wp-includes/vars.php index f61b9692fa..53b8d4d9be 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -2,6 +2,9 @@ // On which page are we ? $PHP_SELF = $_SERVER['PHP_SELF']; +if ( empty($PHP_SELF) ) + $PHP_SELF = $_SERVER["REQUEST_URI"]; + if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) { $pagenow = $self_matches[1]; } else if (strstr($PHP_SELF, '?')) {