From 60e5f77770e45be9af2b1408a7a08a107e4fd835 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 7 Jan 2020 12:26:01 +0100 Subject: [PATCH] Bug 24361: Fix warning in C4::Record line 435 Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435 Caught by a failing test: # Failed test 'Export csv with wrong marcxml should raise a warning' # at t/db_dependent/Exporter/Record.t line 113. # found warning: problem with :721 : :1: parser error : Start tag expected, '<' not found # found warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435. # expected to find warning: (?^u:.*Start tag expected.*) Test plan: Make sure the tests pass now Signed-off-by: Martin Renvoize --- C4/Record.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Record.pm b/C4/Record.pm index f54e368449..e53d155f86 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -427,12 +427,12 @@ sub marc2csv { for my $itemnumber ( @$itemnumbers) { my $item = Koha::Items->find( $itemnumber ); my $biblionumber = $item->biblio->biblionumber; - $output .= marcrecord2csv( $biblionumber, $id, $firstpass, $csv, $fieldprocessing, [$itemnumber] ); + $output .= marcrecord2csv( $biblionumber, $id, $firstpass, $csv, $fieldprocessing, [$itemnumber] ) // ''; $firstpass = 0; } } else { foreach my $biblio (@$biblios) { - $output .= marcrecord2csv( $biblio, $id, $firstpass, $csv, $fieldprocessing ); + $output .= marcrecord2csv( $biblio, $id, $firstpass, $csv, $fieldprocessing ) // ''; $firstpass = 0; } } -- 2.39.5