Bug 9046: Followup FIX perl v.10 raises an error if itemnumbers if undefined

If the itemnumbers parameter is undef, perl raises an error :
"Can't use an undefined value as an ARRAY reference"

Signed-off-by: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Jonathan Druart 2012-11-12 10:18:30 +01:00 committed by Kyle M Hall
parent 3a28bf01cf
commit e7c7f7af02
1 changed files with 2 additions and 0 deletions

View File

@ -2841,6 +2841,8 @@ sub EmbedItemsInMarcBiblio {
my ($marc, $biblionumber) = @_;
croak "No MARC record" unless $marc;
$itemnumbers = [] unless defined $itemnumbers;
my $frameworkcode = GetFrameworkCode($biblionumber);
_strip_item_fields($marc, $frameworkcode);