From 665974a21e0917e62ff84e57df6cc938ff5599f0 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Fri, 28 Aug 2015 15:55:17 +0200 Subject: [PATCH] Prevent error, check if $child_page is not null --- system/src/Grav/Common/Page/Page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 4e88ce5a0..ed961594e 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -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; }