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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2019-08-09 09:27:18 +00:00 committed by Martin Renvoize
parent b2ec43cd8c
commit eb89795328
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -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;