From db7dc22e49a357d0a83b6c99b6ea4372c46a8b57 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 12 Jul 2019 01:30:47 +0000 Subject: [PATCH] Bug 23310: Reduce noise in Koha::Biblio The use of uninitialized value flooding plack-error can get rather distracting and annoying. By using "// q{}" after each of the subfield() calls this eliminates the problem TEST PLAN - run tests before, noise in plack-error log - apply patch - restart_all - run tests again, no Koha/Biblio noise after the restart - run qa test tools --- Koha/Biblio.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index f38a101e27..bba2b4008b 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -579,7 +579,8 @@ sub get_coins { push @authors, $au; } } - $title = $record->subfield( '245', 'a' ) . $record->subfield( '245', 'b' ); + $title = $record->subfield( '245', 'a' ) // q{}; + $title = $title . $record->subfield( '245', 'b' ) // q{}; if ($titletype eq 'a') { $pubyear = $record->field('008') || ''; $pubyear = substr($pubyear->data(), 7, 4) if $pubyear; -- 2.11.0