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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2020-04-10 09:50:13 +00:00 committed by Martin Renvoize
parent 3dd79180f3
commit ed69870da5
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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 {