aboutsummaryrefslogtreecommitdiff
path: root/constants.inc.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-09-20 08:38:16 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-09-20 08:38:16 +0000
commit964e9c2148df40d474b4b47db94a20e4f00ff7fd (patch)
tree15f58f2f322a4caf946f6016c6b3af44f2bcb22e /constants.inc.php
parente47f52ef311b74b586121be436c4e1d54b386d32 (diff)
downloadsemanticscuttle-964e9c2148df40d474b4b47db94a20e4f00ff7fd.tar.gz
semanticscuttle-964e9c2148df40d474b4b47db94a20e4f00ff7fd.tar.bz2
Fix bug #2829642: PATH_INFO undefined
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@352 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'constants.inc.php')
-rw-r--r--constants.inc.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/constants.inc.php b/constants.inc.php
index c198165..4940af8 100644
--- a/constants.inc.php
+++ b/constants.inc.php
@@ -48,13 +48,15 @@ define('PAGE_WATCHLIST', "watchlist");
define('INSTALLATION_ID', md5($GLOBALS['dbname'].$GLOBALS['tableprefix']));
// Correct bugs with PATH_INFO (maybe for Apache 1 or CGI) -- for 1&1 host...
-if(strlen($_SERVER["PATH_INFO"])<strlen($_SERVER["ORIG_PATH_INFO"])) {
- $_SERVER["PATH_INFO"] = $_SERVER["ORIG_PATH_INFO"];
-}
-if(strcasecmp($_SERVER["PATH_INFO"], $_SERVER["SCRIPT_NAME "]) == 0) {
- unset($_SERVER["PATH_INFO"]);
-}
-if(strpos($_SERVER["PATH_INFO"], '.php') !== false) {
- unset($_SERVER["PATH_INFO"]);
+if (isset($_SERVER['PATH_INFO']) && isset($_SERVER['ORIG_PATH_INFO'])) {
+ if(strlen($_SERVER["PATH_INFO"])<strlen($_SERVER["ORIG_PATH_INFO"])) {
+ $_SERVER["PATH_INFO"] = $_SERVER["ORIG_PATH_INFO"];
+ }
+ if(strcasecmp($_SERVER["PATH_INFO"], $_SERVER["SCRIPT_NAME "]) == 0) {
+ unset($_SERVER["PATH_INFO"]);
+ }
+ if(strpos($_SERVER["PATH_INFO"], '.php') !== false) {
+ unset($_SERVER["PATH_INFO"]);
+ }
}
?>