added workaround for missing CGI PATH_INFO envvar
This commit is contained in:
parent
800a1bb508
commit
d225ba4f44
3 changed files with 5 additions and 2 deletions
|
@ -84,7 +84,7 @@ class Router {
|
|||
}
|
||||
}
|
||||
else {
|
||||
throw new \Exception('no PATH_INFO found');
|
||||
throw new \Exception('no CGI PATH_INFO envvar found');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,9 @@ class Router {
|
|||
elseif (isset($_SERVER['ORIG_PATH_INFO'])) {
|
||||
return $_SERVER['ORIG_PATH_INFO'];
|
||||
}
|
||||
elseif (strlen($_SERVER['PHP_SELF']) > strlen($_SERVER['SCRIPT_NAME'])) {
|
||||
return substr($_SERVER['PHP_SELF'], strlen($_SERVER['SCRIPT_NAME']));
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -114,4 +117,4 @@ class Router {
|
|||
public function getAction() { return $this->action; }
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Reference in a new issue