NoZebra : fix on the last page in case there is more than 1 page
authorPaul POULAIN <paul@koha-fr.org>
Sat, 17 Nov 2007 00:49:20 +0000 (18:49 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sat, 17 Nov 2007 17:31:14 +0000 (11:31 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Search.pm

index 9d345d4..c82a148 100644 (file)
@@ -1559,7 +1559,7 @@ sub NZorder {
         # for the requested page, replace biblionumber by the complete record
         # speed improvement : avoid reading too much things
         for (my $counter=$offset;$counter<=$offset+$results_per_page;$counter++) {
-            $result_hash->{'RECORDS'}[$counter] = GetMarcBiblio($result_hash->{'RECORDS'}[$counter])->as_usmarc;
+            $result_hash->{'RECORDS'}[$counter] = GetMarcBiblio($result_hash->{'RECORDS'}[$counter])->as_usmarc if $result_hash->{'RECORDS'}[$counter];
         }
         my $finalresult=();
         $result_hash->{'hits'} = $numbers;