From 7517fb6235516827646fedf1ce0aeff6ca9937dd Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 10 May 2023 18:11:52 +0100 Subject: [PATCH] Bug 12532: (QA follow-up) Undo changes to Koha::Email The changes here aren't required (Email::Address already deals with lists of addresses internally) Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/Email.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Koha/Email.pm b/Koha/Email.pm index fa87b34735..c7c23e3c1c 100644 --- a/Koha/Email.pm +++ b/Koha/Email.pm @@ -118,14 +118,10 @@ sub create { $args->{to} = $params->{to}; } - my @emails = split(',', $args->{to}); - foreach my $email (@emails) { - $email =~ s/ //g; - Koha::Exceptions::BadParameter->throw( - error => "Invalid 'to' parameter: ".$email, - parameter => 'to' - ) unless Koha::Email->is_valid($email); - } + Koha::Exceptions::BadParameter->throw( + error => "Invalid 'to' parameter: " . $args->{to}, + parameter => 'to' + ) unless Koha::Email->is_valid( $args->{to} ); my $addresses = {}; $addresses->{reply_to} = $params->{reply_to}; -- 2.39.5