dont’ fail hard if pages recurse with same path

This commit is contained in:
Andy Miller 2022-10-25 17:47:03 -06:00
parent ea2858ea2b
commit 9c5b8b6496
No known key found for this signature in database
GPG Key ID: 9F2CF38AEBDB0AE0
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,9 @@
1. [](#improved)
* Updated `bin/composer.phar` to latest `2.4.2` version [#3627](https://github.com/getgrav/grav/issues/3627)
1. [](#bugfix)
* Don't fail hard if pages recurse with same page path
# v1.7.37.1
## 10/05/2022

View File

@ -1849,8 +1849,8 @@ class Pages
if ($parent && $page->path()) {
$this->children[$parent->path()][$page->path()] = ['slug' => $page->slug()];
}
} elseif ($parent !== null) {
throw new RuntimeException('Fatal error when creating page instances.');
} else {
return;
}
// Build regular expression for all the allowed page extensions.