Trap empty $requestFileParts
This commit is contained in:
parent
9e2604af85
commit
647a7b5bb7
@ -575,6 +575,11 @@ class Pico
|
|||||||
$requestFileParts[] = $requestUrlPart;
|
$requestFileParts[] = $requestUrlPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($requestFileParts)) {
|
||||||
|
$this->requestFile = $this->getConfig('content_dir') . 'index' . $this->getConfig('content_ext');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// discover the content file to serve
|
// discover the content file to serve
|
||||||
// Note: $requestFileParts neither contains a trailing nor a leading slash
|
// Note: $requestFileParts neither contains a trailing nor a leading slash
|
||||||
$this->requestFile = $this->getConfig('content_dir') . implode('/', $requestFileParts);
|
$this->requestFile = $this->getConfig('content_dir') . implode('/', $requestFileParts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user