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 <jmf@liblime.com>
This commit is contained in:
Andrew Moore 2008-05-09 12:28:56 -05:00 committed by Joshua Ferraro
parent db755a4307
commit c6068880ab
1 changed files with 4 additions and 2 deletions

View File

@ -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.