mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 03:27:08 +02:00
Prevent error, check if $child_page is not null
This commit is contained in:
@@ -1737,7 +1737,7 @@ class Page
|
||||
|
||||
if (isset($routes[$uri_path])) {
|
||||
$child_page = $pages->dispatch($uri->route())->parent();
|
||||
while (!$child_page->root()) {
|
||||
if ($child_page) while (!$child_page->root()) {
|
||||
if ($this->path() == $child_page->path()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user