From 0ce6b60d0dffe894fcefc01605e8c113b47362a2 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Wed, 25 Jan 2023 11:50:41 -0800 Subject: [PATCH 1/1] Fixed ShowEmail --- maps/bin/mapsutil.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/maps/bin/mapsutil.pl b/maps/bin/mapsutil.pl index 15488fd..fba892b 100755 --- a/maps/bin/mapsutil.pl +++ b/maps/bin/mapsutil.pl @@ -374,10 +374,11 @@ $~ = "USERLIST"; } # ShowUsers sub ShowEmail() { + my @fields = qw(userid timestamp sender subject); my ($err, $msg) = $MAPS::db->find( 'email', "userid='$userid'", - qw(userid timestamp sender subject), + \@fields, ); my ($timestamp, $sender, $subject); @@ -391,9 +392,9 @@ $~ = "EMAIL"; while (my $rec = $MAPS::db->getnext) { last unless $rec->{userid}; - $timestamp = $rec->{timestamp}; - $sender = $rec->{sender}; - $subject = $rec->{subject}; + $timestamp = $rec->{timestamp} || ''; + $sender = $rec->{sender} || ''; + $subject = $rec->{subject} || ''; write(); } # while -- 2.17.1