Bug 18736: (QA follow-up) Resolve uninitialized warn from Biblio.pm L3334

Running t/db/Budgets.t:
Use of uninitialized value in join or string at C4/Biblio.pm line 3334.

Test plan:
Run again. Verify no warnings left.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2018-12-14 10:46:56 +01:00 committed by Nick Clemens
parent 2f5e839bf7
commit 876323cf5b
1 changed files with 1 additions and 1 deletions

View File

@ -3336,7 +3336,7 @@ sub ModBiblioMarc {
my $userenv = C4::Context->userenv;
if ($userenv) {
my $borrowernumber = $userenv->{number};
my $borrowername = join ' ', @$userenv{qw(firstname surname)};
my $borrowername = join ' ', map { $_ // q{} } @$userenv{qw(firstname surname)};
unless ($m_rs->in_storage) {
Koha::Util::MARC::set_marc_field($record, C4::Context->preference('MarcFieldForCreatorId'), $borrowernumber);
Koha::Util::MARC::set_marc_field($record, C4::Context->preference('MarcFieldForCreatorName'), $borrowername);