From 8347a82bbfee7b2ba6cb2e7335676aff6d199fd6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Mar 2015 15:51:00 +0100 Subject: [PATCH] Bug 3873: follow-up for all other pages This should fix the issue on other pages. Test plan: Try to download and export the basket (intranet+opac sides). Re-tested for errors in comment #5, they do not longer appear. Signed-off-by: Marc Veron Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 3adddd3410acf45874b7a154c2700f3f4b2e7f4b) Signed-off-by: Chris Cormack --- basket/downloadcart.pl | 1 + basket/sendbasket.pl | 1 + opac/opac-basket.pl | 1 + opac/opac-sendbasket.pl | 1 + 4 files changed, 4 insertions(+) diff --git a/basket/downloadcart.pl b/basket/downloadcart.pl index 569335886a..5feb3f7406 100755 --- a/basket/downloadcart.pl +++ b/basket/downloadcart.pl @@ -66,6 +66,7 @@ if ($bib_list && $format) { foreach my $biblio (@bibs) { my $record = GetMarcBiblio($biblio, 1); + next unless $record; if ($format eq 'iso2709') { $output .= $record->as_usmarc(); diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index a4e4836118..8f48c9320f 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -72,6 +72,7 @@ if ( $email_add ) { $template2->param( biblionumber => $biblionumber ); my $dat = GetBiblioData($biblionumber); + next unless $dat; my $record = GetMarcBiblio($biblionumber, 1); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 690fc3c53d..3dba975bab 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -63,6 +63,7 @@ foreach my $biblionumber ( @bibs ) { $template->param( biblionumber => $biblionumber ); my $dat = &GetBiblioData($biblionumber); + next unless $dat; my $record = &GetMarcBiblio($biblionumber); next unless $record; my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 2aad93a2aa..708e1c1316 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -87,6 +87,7 @@ if ( $email_add ) { $template2->param( biblionumber => $biblionumber ); my $dat = GetBiblioData($biblionumber); + next unless $dat; my $record = GetMarcBiblio($biblionumber, 1); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); -- 2.39.5