diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-08-14 18:24:34 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-08-14 18:24:34 +0100 |
| commit | e8e834d0196486623e62b395fbdc6cf6523002f1 (patch) | |
| tree | 6999fa84264010076f9c2a892599af24a05d73a5 /library/WT/Controller | |
| parent | 7418500653c2bb91bac44f56e43c9ea908b7597d (diff) | |
| download | webtrees-e8e834d0196486623e62b395fbdc6cf6523002f1.tar.gz webtrees-e8e834d0196486623e62b395fbdc6cf6523002f1.tar.bz2 webtrees-e8e834d0196486623e62b395fbdc6cf6523002f1.zip | |
Fix error in descendancy chart for one-parent family
Diffstat (limited to 'library/WT/Controller')
| -rw-r--r-- | library/WT/Controller/Descendancy.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/library/WT/Controller/Descendancy.php b/library/WT/Controller/Descendancy.php index bf9e15bae6..53f8c9ed8e 100644 --- a/library/WT/Controller/Descendancy.php +++ b/library/WT/Controller/Descendancy.php @@ -217,12 +217,14 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { // check if spouse has parents and add an arrow echo '<td> </td>'; echo '<td>'; - foreach ($spouse->getChildFamilies() as $cfamily) { - foreach ($cfamily->getSpouses() as $parent) { - print_url_arrow($parent->getXref().$personcount.$person->getXref(), '?rootid='.$parent->getXref().'&generations='.$this->generations.'&chart_style='.$this->chart_style.'&show_full='.$this->show_full.'&box_width='.$this->box_width.'&ged='.WT_GEDURL, WT_I18N::translate('Start at parents'), 2); - $personcount++; - // only show the arrow for one of the parents - break; + if ($spouse) { + foreach ($spouse->getChildFamilies() as $cfamily) { + foreach ($cfamily->getSpouses() as $parent) { + print_url_arrow($parent->getXref().$personcount.$person->getXref(), '?rootid='.$parent->getXref().'&generations='.$this->generations.'&chart_style='.$this->chart_style.'&show_full='.$this->show_full.'&box_width='.$this->box_width.'&ged='.WT_GEDURL, WT_I18N::translate('Start at parents'), 2); + $personcount++; + // only show the arrow for one of the parents + break; + } } } if ($this->show_full) echo '<br><br> '; |
