diff options
Diffstat (limited to 'includes/functions/functions_charts.php')
| -rw-r--r-- | includes/functions/functions_charts.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/functions/functions_charts.php b/includes/functions/functions_charts.php index 5d9369f26d..9ebc7e3557 100644 --- a/includes/functions/functions_charts.php +++ b/includes/functions/functions_charts.php @@ -126,7 +126,7 @@ function print_family_parents(WT_Family $family, $sosa=0, $label='', $parid='', echo "<td rowspan=\"2\"><img src=\"".$WT_IMAGES["hline"]."\" alt=\"\"></td><td rowspan=\"2\"><img src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"" . ($pbheight+9) . "\" alt=\"\"></td>"; echo "<td><img class=\"line5\" src=\"".$WT_IMAGES["hline"]."\" alt=\"\"></td><td>"; // husband's father - if ($hfam->getHusband()) { + if ($hfam && $hfam->getHusband()) { echo "<table style=\"width: " . ($pbwidth) . "px; height: " . $pbheight . "px;\" border=\"0\"><tr>"; if ($sosa > 0) print_sosa_number($sosa * 4, $hfam->getHusband()->getXref(), "down"); if (!empty($gparid) && $hfam->getHusband()->getXref()==$gparid) print_sosa_number(trim(substr($label,0,-3),".")."."); @@ -144,7 +144,7 @@ function print_family_parents(WT_Family $family, $sosa=0, $label='', $parid='', if ($hfam || $sosa) { // husband's mother echo "</tr><tr><td><img src=\"".$WT_IMAGES["hline"]."\" alt=\"\"></td><td>"; - if ($hfam->getWife()) { + if ($hfam && $hfam->getWife()) { echo "<table style=\"width: " . ($pbwidth) . "px; height: " . $pbheight . "px;\" border=\"0\"><tr>"; if ($sosa > 0) print_sosa_number($sosa * 4 + 1, $hfam->getWife()->getXref(), "down"); if (!empty($gparid) && $hfam->getWife()->getXref()==$gparid) print_sosa_number(trim(substr($label,0,-3),".")."."); @@ -197,7 +197,7 @@ function print_family_parents(WT_Family $family, $sosa=0, $label='', $parid='', echo "<td rowspan=\"2\"><img src=\"".$WT_IMAGES["hline"]."\" alt=\"\"></td><td rowspan=\"2\"><img src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"" . ($pbheight+9) . "\" alt=\"\"></td>"; echo "<td><img class=\"line5\" src=\"".$WT_IMAGES["hline"]."\" alt=\"\"></td><td>"; // wife's father - if ($hfam->getHusband()) { + if ($hfam && $hfam->getHusband()) { echo "<table style=\"width: " . ($pbwidth) . "px; height: " . $pbheight . "px;\"><tr>"; if ($sosa > 0) print_sosa_number($sosa * 4 + 2, $hfam->getHusband()->getXref(), "down"); if (!empty($gparid) && $hfam->getHusband()->getXref()==$gparid) print_sosa_number(trim(substr($label,0,-3),".")."."); @@ -215,7 +215,7 @@ function print_family_parents(WT_Family $family, $sosa=0, $label='', $parid='', if ($hfam || $sosa) { // wife's mother echo "</tr><tr><td><img src=\"".$WT_IMAGES["hline"]."\" alt=\"\"></td><td>"; - if ($hfam->getWife()) { + if ($hfam && $hfam->getWife()) { echo "<table style=\"width: " . ($pbwidth) . "px; height: " . $pbheight . "px;\"><tr>"; if ($sosa > 0) print_sosa_number($sosa * 4 + 3, $hfam->getWife()->getXref(), "down"); if (!empty($gparid) && $hfam->getWife()->getXref()==$gparid) print_sosa_number(trim(substr($label,0,-3),".")."."); |
