Skip to content

Commit

Permalink
Handle empty date fields in gedcoms
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 18, 2024
1 parent bfd733e commit 518e5fb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -13565,6 +13565,17 @@ sub parse_date
}

if(my $date = $params{'date'}) {
if(ref($date)) {
# Caused by empty value, e.g.:
# 1 BIRT
# 2 DATE
# 2 PLAC VERMONT

# $Data::Dumper::Maxdepth = 2;
# print STDERR Data::Dumper->new([$dateofbirth])->Dump();
# die 'BUG: date() should return a scalar, got a ', ref($dateofbirth);
return;
}
if(lc($date) eq 'unknown') {
return;
}
Expand Down

0 comments on commit 518e5fb

Please sign in to comment.