Skip to content

Commit

Permalink
Catch non ref birth details
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Dec 31, 2023
1 parent f70f8d7 commit 0e07113
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -11222,6 +11222,9 @@ sub dateofbirth {
my @b = $person->birth();

for my $i(0..1) {
if(!ref($b[$i])) {
die 'FIXME: ', $person->as_string(), ': ', $b[$i], ' is not a ref';
}
foreach my $item(@{$b[$i]->{'items'}}) {
if(($item->tag() eq '_PRIM') && ($item->value() eq 'Y')) {
$dateofbirth = $b[$i]->date();
Expand Down

0 comments on commit 0e07113

Please sign in to comment.