From ac8805dbef1e05f8d0e5d2ae65b6f9e35dec1f48 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 21 Sep 2006 21:03:11 +0000 Subject: [PATCH] Make sure vars are set. Props Alex King. fixes #3153 git-svn-id: http://svn.automattic.com/wordpress/trunk@4204 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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