From 4d104a380091e7f0a6ad15840a8b90ae13ddd3e9 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Wed, 17 Jul 2024 21:18:15 -0400 Subject: [PATCH] Handle empty date fields in gedcoms --- gedcom | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gedcom b/gedcom index 82c6351..55e81df 100755 --- a/gedcom +++ b/gedcom @@ -11916,6 +11916,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; }