diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 105331009f..96264e4452 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -691,7 +691,8 @@ for (my $i=0;$i<@servers;$i++) { if (C4::Context->preference('COinSinOPACResults')) { my $biblio = Koha::Biblios->find( $res->{'biblionumber'} ); - $res->{coins} = $biblio ? $biblio->get_coins : q{}; # FIXME This should be moved at the beginning of the @newresults loop + # Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid + $res->{coins} = $biblio ? eval {$biblio->get_coins} : q{}; # FIXME This should be moved at the beginning of the @newresults loop } if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) { if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) {