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 <galen.charlton@liblime.com>
$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;
}