From 3a28bf01cfde06009c833b3c335432f2ed1d149e 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 --- C4/Biblio.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 7c3d0efed4..1a4e978a05 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2851,6 +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; require C4::Items; my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); push @item_fields, $item_marc->field($itemtag); -- 2.39.5