From 0ef3b5890df1afb2e533f8c0af60b04389c52d0c Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Mon, 30 Jan 2012 08:52:37 -0500 Subject: [PATCH] Fix SIP2 "unavailable holds" check If no IDs, don't look up an empty array of IDs. Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm index 519382ff80..832c827b92 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm @@ -639,13 +639,14 @@ sub unavail_holds { } }); - my @holds_sip_output = map { + my @holds_sip_output; + @holds_sip_output = map { OpenILS::SIP::clean_text($self->__hold_to_title($_)) } @{ $self->{editor}->search_action_hold_request( {id => [map {$_->{id}} @$ids]} ) - }; + } if (@$ids > 0); return (defined $start and defined $end) ? [ @holds_sip_output[($start-1)..($end-1)] ] : -- 2.11.0