From 43fb0182d490b6e29c2316ce68ee79a7f4c3e70e 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 --- 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.11.0