summaryrefslogtreecommitdiff
path: root/library/WT/Controller/Pedigree.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/WT/Controller/Pedigree.php')
-rw-r--r--library/WT/Controller/Pedigree.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/WT/Controller/Pedigree.php b/library/WT/Controller/Pedigree.php
index 34269437fb..3cddb105e8 100644
--- a/library/WT/Controller/Pedigree.php
+++ b/library/WT/Controller/Pedigree.php
@@ -83,11 +83,11 @@ class WT_Controller_Pedigree extends WT_Controller_Chart {
$show_full = $this->show_full;
$talloffset = $this->talloffset;
- // Validate parameters
- $this->rootid=check_rootid($this->rootid);
-
$this->rootPerson = WT_Person::getInstance($this->rootid);
- if (is_null($this->rootPerson)) $this->rootPerson = new WT_Person('');
+ if (!$this->rootPerson) {
+ $this->rootPerson=$this->getSignificantIndividual();
+ $this->rootid=$this->rootPerson->getXref();
+ }
$this->name = $this->rootPerson->getFullName();
$this->addname = $this->rootPerson->getAddName();