From e4278a21ceabf56d3b049e9f2c2c7a04cd3105f4 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Tue, 25 Feb 2025 14:27:52 +0100 Subject: [PATCH] Bug 20551: Warn and return if deleted biblio not found Signed-off-by: Andrew Fuerste Henry --- Koha/Exporter/Record.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Koha/Exporter/Record.pm b/Koha/Exporter/Record.pm index 8edcbb3fc9..63e6f2c6de 100644 --- a/Koha/Exporter/Record.pm +++ b/Koha/Exporter/Record.pm @@ -139,6 +139,12 @@ sub _get_deleted_biblio_for_export { 'schema' => $marc_flavour } ); + + unless ($biblio_metadata) { + Koha::Logger->get->warn("Failed to load deleted biblio with biblionumber \"$biblionumber\""); + return + } + my $marc_xml = $biblio_metadata->metadata; $marc_xml = StripNonXmlChars($marc_xml); -- 2.39.5