From c6068880ab7434cb8bf0ea18ddbe54575a3deb85 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Fri, 9 May 2008 12:28:56 -0500 Subject: [PATCH] Bug 2047: another fix for error during search when there is no MARC::Record 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. Signed-off-by: Joshua Ferraro --- C4/Biblio.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 08c17c34b5..b6791413b1 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. -- 2.11.0