From 54f5ee33323c5890bf2c1f906e108412cba950bc Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Fri, 9 Jan 2009 11:15:38 -0600 Subject: [PATCH] Prevent multiple warnings per notice filling cron logs. If a value being substituted in was NULL, then warnings like this would be emailed to the crontab owner (or MAILTO): Use of uninitialized value in substitution (s///) at /home/user/kohaclone/C4/Letters.pm line 508. Signed-off-by: Galen Charlton --- C4/Letters.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 24f636cdaf..3bcc51418d 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -502,8 +502,7 @@ sub parseletter { $sth->execute; while ( ( my $field ) = $sth->fetchrow_array ) { my $replacefield = "<<$table.$field>>"; - my $replacedby = $values->{$field}; - + my $replacedby = $values->{$field} || ''; $letter->{title} =~ s/$replacefield/$replacedby/g; $letter->{content} =~ s/$replacefield/$replacedby/g; } -- 2.39.5