From 94f52fb0d23c9ecd0d65aab8325c86172d9d35d1 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 --- 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 2758ec7030e..88186655d9f 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 4df723a8886..c48b2d5e007 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.25.1