From 3dc0aa4293c8997d4660c710727ea0e2235887f4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Dec 2018 12:55:34 -0300 Subject: [PATCH] Bug 21170: Remove "isn't numeric in numeric eq (==)" warnings in MARCdetail Easily removed switching the two conditions. Test plan: Hit catalogue/MARCdetail.pl?biblionumber=1 => Without this patch you will see in the log warnings like Argument "ddc" isn't numeric in numeric eq (==) at /home/vagrant/kohaclone/catalogue/MARCdetail.pl line 277. => With this patch applied the warnings do no longer appear Signed-off-by: Pierre-Marc Thibault Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens (cherry picked from commit b608f548a894cb433c4218b94a33d6b8a824a4c4) Signed-off-by: Martin Renvoize (cherry picked from commit 2cceecd43866efd56d84ab45c6b4e9f10895533f) Signed-off-by: Lucas Gass --- catalogue/MARCdetail.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index a22f8eb99e..7e67b564e1 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -273,7 +273,9 @@ foreach my $field (@fields) { $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{lib}; $item->{ $subf[$i][0] } = GetAuthorisedValueDesc( $field->tag(), $subf[$i][0], $subf[$i][1], '', $tagslib) || $subf[$i][1]; - $norequests = 0 if $subf[$i][1] ==0 and $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan'; + $norequests = 0 + if $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan' + and $subf[$i][1] == 0; } push @item_loop, $item if $item; } -- 2.39.5