summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-12-06 10:09:42 +0000
committerGreg Roach <fisharebest@gmail.com>2013-12-06 10:09:42 +0000
commit0aa6c33441cc5a656abb9ff58948ce8e22eafecd (patch)
tree7f5f3de8a4c4260ae8c719ed056654f87cac2821
parent3a46f36ea804a395f88e2d436d2c41b4daf27d3d (diff)
downloadwebtrees-0aa6c33441cc5a656abb9ff58948ce8e22eafecd.tar.gz
webtrees-0aa6c33441cc5a656abb9ff58948ce8e22eafecd.tar.bz2
webtrees-0aa6c33441cc5a656abb9ff58948ce8e22eafecd.zip
Adding BIRT to a non-INDI record causes fatal error
-rw-r--r--library/WT/Fact.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/WT/Fact.php b/library/WT/Fact.php
index c4e0b114b0..c73f7f6307 100644
--- a/library/WT/Fact.php
+++ b/library/WT/Fact.php
@@ -272,7 +272,7 @@ class WT_Fact {
$attributes[] = '<span dir="auto">' . WT_Filter::escapeHtml($value) . '</span>';
}
$date = $this->getDate();
- if ($this->getTag() == 'BIRT' && $SHOW_PARENTS_AGE) {
+ if ($this->getTag() == 'BIRT' && $SHOW_PARENTS_AGE && $this->getParent() instanceof WT_Individual) {
$attributes[] = $date->display() . format_parents_age($this->getParent(), $date);
} else {
$attributes[] = $date->display();