From 8b24a09917018f0eddae2b809752fc857da6f5b2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Jan 2015 15:29:50 +0100 Subject: [PATCH] Bug 12252: (qa-follow-up) Remove perlcritic error Signed-off-by: Signed-off-by: Gaetan Boisson Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/Biblio.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 25558d6a5a..191e9c7a60 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2943,12 +2943,13 @@ sub EmbedItemsInMarcBiblio { require C4::Items; while ( my ($itemnumber) = $sth->fetchrow_array ) { next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; - my $i = C4::Items::GetItem($itemnumber) if $opachiddenitems; + my $i = $opachiddenitems ? C4::Items::GetItem($itemnumber) : undef; push @items, { itemnumber => $itemnumber, item => $i }; } my @hiddenitems = - C4::Items::GetHiddenItemnumbers( map { $_->{item} } @items ) - if $opachiddenitems; + $opachiddenitems + ? C4::Items::GetHiddenItemnumbers( map { $_->{item} } @items ) + : (); # Convert to a hash for quick searching my %hiddenitems = map { $_ => 1 } @hiddenitems; foreach my $itemnumber ( map { $_->{itemnumber} } @items ) { -- 2.39.5