From cf649efd7251243bc824bab542285ba17adafacb 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 Signed-off-by: Joy Nelson --- Koha/Email.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Email.pm b/Koha/Email.pm index 58340756e8..f381a0cf35 100644 --- a/Koha/Email.pm +++ b/Koha/Email.pm @@ -55,8 +55,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