From cfbe8daf2118f0ecdeea13ef866e86d2e905b686 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 17 Jul 2023 10:59:26 +0000 Subject: [PATCH] Bug 33270: (QA follow-up) Do not change param hashref Might just be a theoretical thing now, but safer to clone. Test plan: Run t/db_dependent/Koha/Biblio/Metadata.t Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- Koha/Biblio/Metadata.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Biblio/Metadata.pm b/Koha/Biblio/Metadata.pm index 448a08b70f..d5bfea5cd0 100644 --- a/Koha/Biblio/Metadata.pm +++ b/Koha/Biblio/Metadata.pm @@ -149,6 +149,7 @@ Will return undef if the record cannot be built sub record_strip_nonxml { my ( $self, $params ) = @_; + $params //= {}; my $record; my $marcxml_error; @@ -166,8 +167,7 @@ sub record_strip_nonxml { return; } - $params->{record} = $record; - return $self->record($params); + return $self->record( { %$params, record => $record } ); } =head2 Internal methods -- 2.39.5