Fix for #218 - ignore root level page

This commit is contained in:
Andy Miller
2015-07-13 11:48:56 -06:00
parent 547a049140
commit 015ef2c6ce

View File

@@ -622,7 +622,7 @@ class Pages
}
}
if (!empty($page_found)) {
if ($parent && !empty($page_found)) {
$file = new \SplFileInfo($page_found);
$page->init($file);
$page->extension($page_extension);
@@ -639,7 +639,6 @@ class Pages
/** @var \DirectoryIterator $file */
foreach (new \FilesystemIterator($directory) as $file) {
$name = $file->getFilename();
if ($file->isFile()) {