From d5223a727490d04c789911a0faad11bbd8d9c40a 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). --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index afb60d3..eb96197 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2850,7 +2850,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); -- 1.7.10.4