diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e92b8036..a7c9a4772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ 1. [](#bugfix) * Ignore errors when using `set_time_limit` in `Archiver` and `GPM\Response` classes [#3023](https://github.com/getgrav/grav/issues/3023) * Fixed moving page to itself causing the page folder to be lost (converted to an empty file) + * Fixed `PageStorage` detecting files as pages # v1.7.9 ## 03/19/2021 diff --git a/system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php b/system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php index 0ccb85661..e02bda4ab 100644 --- a/system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php +++ b/system/src/Grav/Common/Flex/Types/Pages/Storage/PageStorage.php @@ -534,7 +534,7 @@ class PageStorage extends FolderStorage $markdown = []; $children = []; - if (is_string($path) && file_exists($path)) { + if (is_string($path) && is_dir($path)) { $modified = filemtime($path); $iterator = new FilesystemIterator($path, $this->flags);