From a5f12720e466e317e1419b707bfc0a8ed3ac6297 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 --- Koha/Email.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Koha/Email.pm b/Koha/Email.pm index fa87b34735c..c7c23e3c1c6 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.41.0