From 0b123a85ed79f15b4445d146341448c494e1d2c2 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Fri, 22 Jun 2018 09:18:16 +0000 Subject: [PATCH] Bug 20271: (QA follow-up) Does not return deleted record in GetMarcBiblio Test plan: Go to url /cgi-bin/koha/catalogue/detail.pl?biblionumber=[deleted biblionumber] --> without patch you see the deleted record --> with patch you should see message "The record you requested does not exist" Signed-off-by: Josef Moravec --- C4/Biblio.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index df3b966..2aeaf2a 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1137,6 +1137,10 @@ sub GetMarcBiblio { $sth->execute($biblionumber); my $row = $sth->fetchrow_hashref; my $biblioitemnumber = $row->{'biblioitemnumber'}; + + # When the record is not found or is deleted, then we should return + return unless $biblioitemnumber; + my $marcxml = GetXmlBiblio( $biblionumber ); $marcxml = StripNonXmlChars( $marcxml ); my $frameworkcode = GetFrameworkCode($biblionumber); -- 2.1.4