From e925568a3067e77173f4d21f476b28f8aa068571 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Mar 2020 16:21:06 +0100 Subject: [PATCH] Bug 24826: Remove warnings from Sendmail Use of uninitialized value $mail{"Cc"} in substitution (s///) at /usr/share/perl5/Mail/Sendmail.pm Signed-off-by: Martin Renvoize --- Koha/Email.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Email.pm b/Koha/Email.pm index 1dc353a9f8..f1e825e526 100644 --- a/Koha/Email.pm +++ b/Koha/Email.pm @@ -56,8 +56,8 @@ sub create_message_headers { $mail{'To'} = C4::Context->preference('SendAllEmailsTo'); } else { - $mail{'Cc'} = $params->{cc}; - $mail{'Bcc'} = $params->{bcc}; + $mail{'Cc'} = $params->{cc} if exists $params->{cc}; + $mail{'Bcc'} = $params->{bcc} if exists $params->{bcc}; } if ( C4::Context->preference('ReplytoDefault') ) { -- 2.39.5