Workaround for webservers omitting QUERY_STRING

Thanks @theshka for spotting
This commit is contained in:
Daniel Rudolf 2015-08-30 21:31:47 +02:00
parent 5eed6d0562
commit 533822320e

View file

@ -374,7 +374,7 @@ class Pico
//
// Note: you MUST NOT call the index page with /pico/?someBooleanParameter;
// use /pico/?someBooleanParameter= or /pico/?index&someBooleanParameter instead
$pathComponent = $_SERVER['QUERY_STRING'];
$pathComponent = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';
if (($pathComponentLength = strpos($pathComponent, '&')) !== false) {
$pathComponent = substr($pathComponent, 0, $pathComponentLength);
}