From ff61e9f16fc26e3299adf8d724f50e31c478c365 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 Nov 2012 10:18:30 +0100 Subject: [PATCH] Bug 9046: Followup FIX perl v5.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 Signed-off-by: Jared Camins-Esakov --- C4/Biblio.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 478bd55572..832da69ede 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2841,6 +2841,8 @@ sub EmbedItemsInMarcBiblio { my ($marc, $biblionumber, $itemnumbers) = @_; croak "No MARC record" unless $marc; + $itemnumbers = [] unless defined $itemnumbers; + my $frameworkcode = GetFrameworkCode($biblionumber); _strip_item_fields($marc, $frameworkcode); -- 2.39.5