From 0215736bccd621a55ad3ee57ef8fabb4b83005c2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Nov 2012 18:34:40 +0100 Subject: [PATCH] Bug 9046: FIX wrong test on an arrayref instead of an array EmbedItemsInMarcBiblio does not embed items when the itemnumbers param is given. That breaks the export tools (used from commandline). Signed-off-by: Chris Cormack Signed-off-by: Jared Camins-Esakov --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index eb213d5071..478bd55572 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2851,7 +2851,7 @@ sub EmbedItemsInMarcBiblio { my @item_fields; my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); while (my ($itemnumber) = $sth->fetchrow_array) { - next if $itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; + next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; require C4::Items; my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); push @item_fields, $item_marc->field($itemtag); -- 2.39.5