From ed69870da5253a3cca853d841d2e3adb844b31fb Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 10 Apr 2020 09:50:13 +0000 Subject: [PATCH] Bug 24966: (QA follow-up) Fix return value of hold_patron_bcode It is used in list context, but we need a scalar value. Can be fixed by adding scalar's, or returning empty string as here. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- C4/SIP/ILS/Item.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm index 3421bda6e9..37c9c6986a 100644 --- a/C4/SIP/ILS/Item.pm +++ b/C4/SIP/ILS/Item.pm @@ -196,12 +196,12 @@ sub hold_patron_name { sub hold_patron_bcode { my $self = shift; - my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return; + my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return q{}; my $holder = Koha::Patrons->find( $borrowernumber ); if ($holder and $holder->cardnumber ) { return $holder->cardnumber; } - return; + return q(); } sub destination_loc { -- 2.39.5