[Koha-patches] [PATCH] returning in case there is no MARC::Record (scanindex)

jmf at arwen.metavore.com jmf at arwen.metavore.com
Mon May 5 12:48:46 CEST 2008


General question for everyone: how should errors like the one
anticipated here be handled. It strikes me that simply returning if
there is no $record isn't enough ... and there's another case, where the
$record is present, but corrupted. Any thoughts?

Josh

On Fri, May 02, 2008 at 07:03:25PM +0200, paul.poulain at biblibre.com wrote:
> From: Paul POULAIN <paul.poulain at biblibre.com>
> 
> diff --git a/C4/Biblio.pm b/C4/Biblio.pm
> index 08c17c3..8dee5b3 100755
> --- a/C4/Biblio.pm
> +++ b/C4/Biblio.pm
> @@ -3104,6 +3104,7 @@ sub get_biblio_authorised_values {
>      my $authorised_values;
>  
>      my $record  = GetMarcBiblio( $biblionumber );
> +    return unless $record;
>      my $tagslib = GetMarcStructure( $forlibrarian, $frameworkcode );
>  
>      # assume that these entries in the authorised_value table are bibliolevel.
> -- 
> 1.5.3.2
> 
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches



More information about the Koha-patches mailing list