From 6cab48e9e13ee34b4df4bf7bc04dbb4c44ab08f9 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 Content-Type: text/plain; charset=utf-8 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 --- 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.30.2