summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-07-05 23:16:32 +0000
committerfisharebest <fisharebest@gmail.com>2013-07-05 23:16:32 +0000
commitcdfc6fea5b5bbe301c88744960d0b459e2c0a7e6 (patch)
tree5aac6f65822c0668292455646b15633ff839986e
parent6c8e52cffdb8ff42a7c08f7983d7795f43f0d9b6 (diff)
downloadwebtrees-cdfc6fea5b5bbe301c88744960d0b459e2c0a7e6.tar.gz
webtrees-cdfc6fea5b5bbe301c88744960d0b459e2c0a7e6.tar.bz2
webtrees-cdfc6fea5b5bbe301c88744960d0b459e2c0a7e6.zip
PHP error when no marriage
-rw-r--r--includes/functions/functions_print.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index 4d2e2a6e08..0f5b5561b6 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -229,7 +229,7 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") {
foreach (explode('|', WT_EVENTS_BIRT) as $birttag) {
if (!in_array($birttag, $opt_tags)) {
$event = $person->getFactByType($birttag);
- if ($event->getDate()->isOK() || $event->getPlace()) {
+ if ($event && ($event->getDate()->isOK() || $event->getPlace())) {
$tmp=new WT_Place($event->getPlace(), WT_GED_ID);
$birthplace .= $tmp->getShortName();
break;