From b23d5d84b07ce7011169c692ddc7569c9763c00e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 29 Jul 2014 16:12:52 -0300 Subject: [PATCH] Bug 12674: GetMarcISSN should not return empty ISSN This patch makes GetMarcISSN test for empty subfield before pushing to the result array. To test: - Run the regression test => FAILS for all MARC flavours - Apply the patch - Run the regression test => SUCCESS: tests pass - Sign off Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/Biblio.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index eb2ee2f6c1..f2e7014db6 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1730,7 +1730,8 @@ sub GetMarcISSN { } my @marcissns; foreach my $field ( $record->field($scope) ) { - push @marcissns, $field->subfield( 'a' ); + push @marcissns, $field->subfield( 'a' ) + if ( $field->subfield( 'a' ) ne "" ); } return \@marcissns; } # end GetMarcISSN -- 2.39.5