Bug 30781: Fix warning in GetPreparedLetter

Test by running :
  prove t/db_dependent/Letters.t
Check you dont see warning :
  Use of uninitialized value $val in substitution iterator

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 34b84b68e5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Fridolin Somers 2022-05-18 17:50:13 -10:00 committed by Lucas Gass
parent 3b3b7f0ad9
commit 0783b96359

View file

@ -599,6 +599,7 @@ sub GetPreparedLetter {
if (%$substitute) {
while ( my ($token, $val) = each %$substitute ) {
$val //= q{};
if ( $token eq 'items.content' ) {
$val =~ s|\n|<br/>|g if $letter->{is_html};
}