Skip to content

Commit

Permalink
fix(page-element): Fix empty parent sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Oct 15, 2018
1 parent fdf2e25 commit a6c01af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PageElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a6c01af

Please sign in to comment.