Trap empty $requestFileParts
This commit is contained in:
parent
9e2604af85
commit
647a7b5bb7
1 changed files with 5 additions and 0 deletions
|
@ -575,6 +575,11 @@ class Pico
|
|||
$requestFileParts[] = $requestUrlPart;
|
||||
}
|
||||
|
||||
if (empty($requestFileParts)) {
|
||||
$this->requestFile = $this->getConfig('content_dir') . 'index' . $this->getConfig('content_ext');
|
||||
return;
|
||||
}
|
||||
|
||||
// discover the content file to serve
|
||||
// Note: $requestFileParts neither contains a trailing nor a leading slash
|
||||
$this->requestFile = $this->getConfig('content_dir') . implode('/', $requestFileParts);
|
||||
|
|
Loading…
Add table
Reference in a new issue