On a basket or a basket download, or csv export, if Koha cannot get a biblio, then it failed with error 500.
This patch fixes that behaviour skipping the faulty record in order to present the user with the biblios which are not causing trouble.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
# Getting the record
my $record = GetMarcBiblio($biblio);
-
+ next unless $record;
# Getting the framework
my $frameworkcode = GetFrameworkCode($biblio);
my $dat = &GetBiblioData($biblionumber);
my $record = &GetMarcBiblio($biblionumber);
+ next unless $record;
my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
foreach my $biblio (@bibs) {
my $record = GetMarcBiblio($biblio);
+ next unless $record;
switch ($format) {
case "iso2709" { $output .= $record->as_usmarc(); }
my $biblionumber = $biblio->{biblionumber};
my $record = GetMarcBiblio($biblionumber);
+ next unless $record;
switch ($format) {
case "iso2709" { $output .= $record->as_usmarc(); }