From 6976c2ef996a6ad0df948fbc3c56774c8ab0acd5 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 6 Jan 2009 18:54:08 -0600 Subject: [PATCH] patch followup: restore test in GetMarcItem Change made to GetMarcItem to quell a warning changed sense of a test; defined($foo) is *not* the same as $foo ne ''. Signed-off-by: Galen Charlton --- C4/Items.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index 9aeef8d3a1..49adccffc8 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1527,7 +1527,11 @@ sub GetMarcItem { # Tack on 'items.' prefix to column names so that TransformKohaToMarc will work. # Also, don't emit a subfield if the underlying field is blank. - my $mungeditem = { map { defined($itemrecord->{$_}) ? ("items.$_" => $itemrecord->{$_}) : () } keys %{ $itemrecord } }; + my $mungeditem = { + map { + defined($itemrecord->{$_}) && $itemrecord->{$_} ne '' ? ("items.$_" => $itemrecord->{$_}) : () + } keys %{ $itemrecord } + }; my $itemmarc = TransformKohaToMarc($mungeditem); my $unlinked_item_subfields = _parse_unlinked_item_subfields_from_xml($mungeditem->{'items.more_subfields_xml'}); -- 2.39.5