[Koha-patches] [PATCH] Bug 2047: another fix for error during search when there is no MARC::Record

Andrew Moore andrew.moore at liblime.com
Fri May 9 19:28:56 CEST 2008


This is another fix for a bug that was introduced while adding this feature.
I believe that either this patch or the one at:
http://lists.koha.org/pipermail/koha-patches/2008-May/000309.html
should be applied.

In the case that GetMarcBiblio or GetMarcStructure does not return a true value,
this returns without further processing.
---
 C4/Biblio.pm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 08c17c3..b679141 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -3103,8 +3103,10 @@ sub get_biblio_authorised_values {
 
     my $authorised_values;
 
-    my $record  = GetMarcBiblio( $biblionumber );
-    my $tagslib = GetMarcStructure( $forlibrarian, $frameworkcode );
+    my $record  = GetMarcBiblio( $biblionumber )
+      or return $authorised_values;
+    my $tagslib = GetMarcStructure( $forlibrarian, $frameworkcode )
+      or return $authorised_values;
 
     # assume that these entries in the authorised_value table are bibliolevel.
     # ones that start with 'item%' are item level.
-- 
1.5.5.rc0.16.g02b00




More information about the Koha-patches mailing list