From cf36ffa0d3aca950173397f2fa2ad430cbb0c9d1 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 19 Mar 2013 04:07:53 -0700 Subject: [PATCH] Bug 8015: Fix error where field object is returned instead of field value for fields without subfields Signed-off-by: Leila Signed-off-by: Bernardo Gonzalez Kriegel --- Koha/SimpleMARC.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SimpleMARC.pm b/Koha/SimpleMARC.pm index 82abe00..75b8585 100644 --- a/Koha/SimpleMARC.pm +++ b/Koha/SimpleMARC.pm @@ -28,7 +28,7 @@ our @EXPORT = qw( our $VERSION = '0.01'; -our $debug = 0; +our $debug = 10; =head1 NAME @@ -174,7 +174,7 @@ sub read_field { my @fields = $record->field( $fieldName ); - return @fields unless $subfieldName; + return map { $_->data() } @fields unless $subfieldName; my @subfields; foreach my $field ( @fields ) { -- 1.7.9.5