Skip to content

Commit

Permalink
getOwnerPage can return a boolean.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Aug 10, 2016
1 parent 863968e commit 2acad2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getCMSFields()


if($virtual = $fields->dataFieldByName('VirtualClones')) {
if($this->Parent()->exists() && $this->Parent()->getOwnerPage()->exists()) {
if($this->Parent() && $this->Parent()->exists() && $this->Parent()->getOwnerPage() && $this->Parent()->getOwnerPage()->exists()) {
$tab = $fields->findOrMakeTab('Root.VirtualClones');
$tab->setTitle(_t('BaseElement.VIRTUALTABTITLE', 'Linked To'));

Expand Down

0 comments on commit 2acad2f

Please sign in to comment.