add path exist validation

This commit is contained in:
ghost 2024-02-01 20:53:45 +02:00
parent 0de8dcc249
commit dff5ed97a1

View File

@ -58,6 +58,11 @@ class Filesystem
public function getPageUriByPath(string $path): ?string
{
if (!in_array($path, $this->_list) || !is_file($path) || !is_readable($path))
{
return null;
}
$path = str_replace(
sprintf(
'%s/pages/',