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, '?')) {