From acff2645584043c8f34515e3326973f149dcf913 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 15 Jan 2015 15:20:02 +0100 Subject: [PATCH] Bug 12861: (follow-up) Noisy warn in error logs Completely get rid of warns. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/AuthoritiesMarc.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index a779cbc5ff..34151fc321 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -169,18 +169,19 @@ sub SearchAuthorities { $attr = " \@attr 1=Any "; } - if ( @$operator[$i] eq 'is' ) { + my $operator = @$operator[$i]; + if ( $operator and $operator eq 'is' ) { $attr .= " \@attr 4=1 \@attr 5=100 " ; ##Phrase, No truncation,all of subfield field must match } - elsif ( @$operator[$i] eq "=" ) { + elsif ( $operator and $operator eq "=" ) { $attr .= " \@attr 4=107 "; #Number Exact match } - elsif ( @$operator[$i] eq "start" ) { + elsif ( $operator and $operator eq "start" ) { $attr .= " \@attr 3=2 \@attr 4=1 \@attr 5=1 " ; #Firstinfield Phrase, Right truncated } - elsif ( @$operator[$i] eq "exact" ) { + elsif ( $operator and $operator eq "exact" ) { $attr .= " \@attr 4=1 \@attr 5=100 \@attr 6=3 " ; ##Phrase, No truncation,all of subfield field must match } -- 2.39.5