Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnysideup committed Jan 18, 2022
1 parent 6a10480 commit de2e563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/Model/SiteTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,13 +952,13 @@ public function setParent($item)
/**
* Get the parent of this page.
*
* @return SiteTree Parent of this page
* @return SiteTree|null
*/
public function getParent()
{
$parentID = $this->getField("ParentID");
if ($parentID) {
return SiteTree::get_by_id(self::class, $parentID);
return SiteTree::get_by_id($parentID);
}
return null;
}
Expand Down

0 comments on commit de2e563

Please sign in to comment.