From 6cf50ada7b0efce61f2029b20ecdc94bb45a3d5f 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 --------- vertical break where you stop your cut-and-paste. This test should be repeatable with cut-and-paste easily. restart_all kshell prove t/db_dependent/Koha/Biblio.t -- may strangely be quiet. prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Biblio.t -- should be noisy. prove t/db_dependent/Koha/Biblio.t -- will always be noisy now. exit git bz apply 23310 restart_all kshell prove t/db_dependent/Koha/Biblio.t -- will be quiet. prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Biblio.t -- will be quiet. prove t/db_dependent/Koha/Biblio.t -- will be quiet. qa -v 2 -c 1 --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index f38a101e27..ce472a7f58 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -579,7 +579,7 @@ sub get_coins { push @authors, $au; } } - $title = $record->subfield( '245', 'a' ) . $record->subfield( '245', 'b' ); + $title = $record->field('245')->as_string('ab'); if ($titletype eq 'a') { $pubyear = $record->field('008') || ''; $pubyear = substr($pubyear->data(), 7, 4) if $pubyear; -- 2.11.0