Bug 3873: follow-up for all other pages
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 25 Mar 2015 14:51:00 +0000 (15:51 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 31 Mar 2015 13:52:10 +0000 (10:52 -0300)
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 <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
basket/downloadcart.pl
basket/sendbasket.pl
opac/opac-basket.pl
opac/opac-sendbasket.pl

index 199271e..2d2ceb8 100755 (executable)
@@ -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();
index 9c3e6a5..0614aa3 100755 (executable)
@@ -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 );
index 2b345e1..b374f3c 100755 (executable)
@@ -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 );
index d0aa34a..551ee1c 100755 (executable)
@@ -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 );