Bug 24361: Silent Items/GetItemsForInventory.t

It was displaying hundreds of:
Use of uninitialized value in concatenation (.) or string at
/kohadevbox/koha/C4/Items.pm line 862.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-02-13 10:29:56 +01:00 committed by Martin Renvoize
parent 531c5baaee
commit f2b1086387
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -859,7 +859,11 @@ sub GetItemsForInventory {
# Auth values
foreach (keys %$row) {
if (defined($avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}})) {
if (
defined(
$avmapping->{ "items.$_," . $row->{'frameworkcode'} . "," . ( $row->{$_} // q{} ) }
)
) {
$row->{$_} = $avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}};
}
}