Prevent error, check if $child_page is not null

This commit is contained in:
Flavio Copes
2015-08-28 15:55:17 +02:00
parent be4af2403b
commit 665974a21e

View File

@@ -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;
}