From 60d2619df7a478c1b7af5dcd1080ac0c4c9395fc Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 18 May 2022 17:50:13 -1000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 34b84b68e509c9172b850dad4dbc5b7e9f518225) Signed-off-by: Lucas Gass (cherry picked from commit 0783b96359e392b95538a7aca78f263ae178e1ca) Signed-off-by: Arthur Suzuki (cherry picked from commit 994868be66f808d6d98ffdce3e46e233fd751712) Signed-off-by: Victor Grousset/tuxayo --- C4/Letters.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Letters.pm b/C4/Letters.pm index 30566cd4dd..123c845dc9 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -658,6 +658,7 @@ sub GetPreparedLetter { if (%$substitute) { while ( my ($token, $val) = each %$substitute ) { + $val //= q{}; if ( $token eq 'items.content' ) { $val =~ s|\n|
|g if $letter->{is_html}; } -- 2.39.5