From 8fd6b90f45f02823ba01232dc6a5ed8c235d621e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 31 May 2022 09:56:09 +0200 Subject: [PATCH] Bug 30195: Remove second parameter for GetMarcFromKohaField It does not longer exist. Also fix a spelling (emtpy ==> empty) Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/Suggestions.pm | 8 ++++---- t/db_dependent/Suggestions.t | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 2758ec7030..88186655d9 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -617,19 +617,19 @@ sub MarcRecordFromNewSuggestion { if (my $isbn = $suggestion->{isbn}) { for my $field (qw(biblioitems.isbn biblioitems.issn)) { - my ($tag, $subfield) = GetMarcFromKohaField($field, ''); + my ($tag, $subfield) = GetMarcFromKohaField($field); $record->append_fields( MARC::Field->new($tag, ' ', ' ', $subfield => $isbn) ); } } else { - my ($title_tag, $title_subfield) = GetMarcFromKohaField('biblio.title', ''); + my ($title_tag, $title_subfield) = GetMarcFromKohaField('biblio.title'); $record->append_fields( MARC::Field->new($title_tag, ' ', ' ', $title_subfield => $suggestion->{title}) ); - my ($author_tag, $author_subfield) = GetMarcFromKohaField('biblio.author', ''); + my ($author_tag, $author_subfield) = GetMarcFromKohaField('biblio.author'); if ($record->field( $author_tag )) { $record->field( $author_tag )->add_subfields( $author_subfield => $suggestion->{author} ); } @@ -640,7 +640,7 @@ sub MarcRecordFromNewSuggestion { } } - my ($it_tag, $it_subfield) = GetMarcFromKohaField('biblioitems.itemtype', ''); + my ($it_tag, $it_subfield) = GetMarcFromKohaField('biblioitems.itemtype'); if ($record->field( $it_tag )) { $record->field( $it_tag )->add_subfields( $it_subfield => $suggestion->{itemtype} ); } diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t index 4df723a888..c48b2d5e00 100755 --- a/t/db_dependent/Suggestions.t +++ b/t/db_dependent/Suggestions.t @@ -667,7 +667,7 @@ subtest 'Suggestion with ISBN' => sub { is($record->field( $title_tag), undef, "Record from suggestion title should be empty"); my ($author_tag, $author_subfield) = C4::Biblio::GetMarcFromKohaField('biblio.author', ''); - is($record->field( $author_tag), undef, "Record from suggestion author should be emtpy"); + is($record->field( $author_tag), undef, "Record from suggestion author should be empty"); }; $schema->storage->txn_rollback; -- 2.39.5