From 5fbeda5c2568e5a5d3e0b79b6e464b42cfd28558 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 21 Sep 2006 21:03:11 +0000 Subject: [PATCH] Make sure vars are set. Props Alex King. fixes #3153 git-svn-id: https://develop.svn.wordpress.org/trunk@4204 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index ad4fe12001..6d5fec7344 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -37,7 +37,10 @@ class WP { $error = '404'; $this->did_permalink = true; - $pathinfo = $_SERVER['PATH_INFO']; + if ( isset($_SERVER['PATH_INFO']) ) + $pathinfo = $_SERVER['PATH_INFO']; + else + $pathinfo = ''; $pathinfo_array = explode('?', $pathinfo); $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); $req_uri = $_SERVER['REQUEST_URI']; @@ -45,7 +48,10 @@ class WP { $req_uri = $req_uri_array[0]; $self = $_SERVER['PHP_SELF']; $home_path = parse_url(get_option('home')); - $home_path = $home_path['path']; + if ( isset($home_path['path']) ) + $home_path = $home_path['path']; + else + $home_path = ''; $home_path = trim($home_path, '/'); // Trim path info from the end and the leading home path from the