From c2ba205097bb4dcfda42713f39debc73716c6e5b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 9 Aug 2019 09:27:18 +0000 Subject: [PATCH] Bug 23329: (QA follow-up) Resolve warning on wrong biblionumber Passing a wrong biblionumber generates a warning: GetMarcUrls called on undefined record at opac/tracklinks.pl line 58. Test plan: [1] Try it again with a wrong biblionumber and check the logs. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize Signed-off-by: Lucas Gass --- opac/tracklinks.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl index 09afd3209a..26b8a12a87 100755 --- a/opac/tracklinks.pl +++ b/opac/tracklinks.pl @@ -55,7 +55,7 @@ if ($uri && ($biblionumber || $itemnumber) ) { } my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); - my $marc_urls = C4::Biblio::GetMarcUrls($record, C4::Context->preference('marcflavour')); + my $marc_urls = $record ? C4::Biblio::GetMarcUrls($record, C4::Context->preference('marcflavour')) : []; my $search_crit = { uri => $uri }; if( $itemnumber ) { # itemnumber is leading over biblionumber $search_crit->{itemnumber} = $itemnumber; -- 2.39.5