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 <chris@bigballofwax.co.nz>
This commit is contained in:
Jonathan Druart 2012-11-09 18:34:40 +01:00 committed by Kyle M Hall
parent 042b6f170b
commit 3a28bf01cf
1 changed files with 1 additions and 0 deletions

View File

@ -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);