diff --git a/src/PageElement.php b/src/PageElement.php index ad8075f..e834740 100755 --- a/src/PageElement.php +++ b/src/PageElement.php @@ -196,7 +196,7 @@ public function getAllSectionParents() { foreach ($this->PageSections() as $section) { $p = $section->Parent(); - if (!$p->ID) { + if (!$p || !$p->ID) { // If our parent doesn't have an ID it's probably deleted/archived, so we just don't list it. // TODO: Improve this to list the parent as "archived" continue;