@@ -, +, @@ --- C4/XSLT.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/C4/XSLT.pm +++ a/C4/XSLT.pm @@ -265,9 +265,10 @@ sub XSLTParse4Display { my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); $variables ||= {}; + my $biblio; if (C4::Context->preference('OPACShowOpenURL')) { my @biblio_itemtypes; - my $biblio = Koha::Biblios->find($biblionumber); + $biblio //= Koha::Biblios->find($biblionumber); if (C4::Context->preference('item-level_itypes')) { @biblio_itemtypes = $biblio->items->get_column("itype"); } else { @@ -284,7 +285,7 @@ sub XSLTParse4Display { my $partsxml = ''; # possibly insert component records into Detail views if ($xslsyspref =~ m/Details/) { - my $biblio = Koha::Biblios->find( $biblionumber ); + $biblio //= Koha::Biblios->find( $biblionumber ); my $components = $biblio->get_marc_analytics(300); $variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1; --