From ea47e6cdc3a515f76b6933afe4a0edf3d6bb0f02 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Mon, 25 Jan 2016 07:01:29 -0700 Subject: [PATCH] Revert "Bug 15572: TransformHtmlToMarc - rewrite the loop" This reverts commit 1eab5c199d21a622abde7e47ca248d80e882ca46. --- C4/Biblio.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 5ecae00259..03ccec9890 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2515,10 +2515,11 @@ sub TransformHtmlToMarc { # creating a new record my $record = MARC::Record->new(); + my $i = 0; my @fields; my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' ); #FIXME This code assumes that the CGI params will be in the same order as the fields in the template; this is no absolute guarantee! - for (my $i = 0; $params[$i]; $i++ ) { # browse all CGI params + while ( $params[$i] ) { # browse all CGI params my $param = $params[$i]; my $newfield = 0; @@ -2578,6 +2579,7 @@ sub TransformHtmlToMarc { } push @fields, $newfield if ($newfield); } + $i++; } $record->append_fields(@fields); -- 2.39.5