Bug 11797: fix odd number of elements in hash (UNIMARC)

I got the same warning for my UNIMARC DB.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fa989631f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2014-04-15 11:08:54 +02:00 committed by Fridolin Somers
parent be59e84075
commit 6bf8a6c62e
1 changed files with 4 additions and 4 deletions

View File

@ -957,7 +957,7 @@ sub BuildSummary {
foreach my $field ($record->field('2..')) {
push @authorized, {
heading => $field->as_string('abcdefghijlmnopqrstuvwxyz'),
hemain => $field->subfield('a'),
hemain => ( $field->subfield('a') // undef ),
field => $field->tag(),
};
}
@ -969,7 +969,7 @@ sub BuildSummary {
my $thesaurus = $field->subfield('2') ? "thes. : ".$thesaurus{"$field->subfield('2')"}." : " : '';
push @seefrom, {
heading => $thesaurus . $field->as_string('abcdefghijlmnopqrstuvwxyz'),
hemain => $field->subfield('a'),
hemain => ( $field->subfield('a') // undef ),
type => 'seefrom',
field => $field->tag(),
};
@ -983,9 +983,9 @@ sub BuildSummary {
field => $_->tag,
type => $type,
heading => $heading,
hemain => $_->subfield('a'),
hemain => ( $_->subfield('a') // undef ),
search => $heading,
authid => $_->subfield('9'),
authid => ( $_->subfield('9') // undef ),
}
} $record->field('5..');