mirror of
https://github.com/YGGverse/gemini-php.git
synced 2025-01-13 08:38:01 +00:00
add path exist validation
This commit is contained in:
parent
0de8dcc249
commit
dff5ed97a1
@ -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/',
|
||||
|
Loading…
Reference in New Issue
Block a user