From e4d4ce5ab85516bf6fb7955b54dfcaf1137770b0 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Fri, 7 Sep 2012 10:58:53 -0400 Subject: [PATCH] Bug 8447: Make sure we have enough subfields for broader_headings Thanks to wajasu for providing the debugging information, as I cannot seem to duplicate the problem, even seeing where it could come from. Signed-off-by: Brendan Gallagher Signed-off-by: Brendan --- C4/Linker/Default.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Linker/Default.pm b/C4/Linker/Default.pm index 653dabd..7ca04b7 100644 --- a/C4/Linker/Default.pm +++ b/C4/Linker/Default.pm @@ -56,7 +56,7 @@ sub get_link { if ( !defined $authid && $self->{'broader_headings'} ) { my $field = $heading->field(); - my @subfields = $field->subfields(); + my @subfields = grep { $_->[0] ne '9' } $field->subfields(); if ( scalar @subfields > 1 ) { pop @subfields; $field->replace_with( @@ -64,7 +64,7 @@ sub get_link { $field->tag, $field->indicator(1), $field->indicator(2), - map { $_[0] => $_[1] } @subfields + map { $_->[0] => $_->[1] } @subfields ) ); ( $authid, $fuzzy ) = -- 1.7.2.5