From 43716f14e0346121e561f42a6bdbef47ab11306f 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 --- catalogue/MARCdetail.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index b4adcfdeea..96eefaaedc 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -274,7 +274,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.11.0