]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Fix bug #2829642: PATH_INFO undefined
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sun, 20 Sep 2009 08:38:16 +0000 (08:38 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sun, 20 Sep 2009 08:38:16 +0000 (08:38 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@352 b3834d28-1941-0410-a4f8-b48e95affb8f

constants.inc.php

index c198165c2d854779f260c87be05633bc5bedaf25..4940af89536c1832392a99128ccf3feb385cbc61 100644 (file)
@@ -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"]);
+       }
 }
 ?>