Fix handling of ranges in OpenILS::SIP::Patron::fine_items(). user/dyrcona/lp1069833
authorJason Stephenson <jason@sigio.com>
Mon, 22 Oct 2012 14:05:32 +0000 (10:05 -0400)
committerJason Stephenson <jason@sigio.com>
Mon, 22 Oct 2012 14:17:43 +0000 (10:17 -0400)
When the client specifies a begin and end range for SIP2 fine items,
only the first fine item is returned. This is because of a typo on
line 646. The @fines array should be dereferenced there as @fines and
not $fines.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm

index 4a77bd0..9299738 100644 (file)
@@ -643,7 +643,7 @@ sub fine_items {
     my $log_status = $@ ? 'ERROR: ' . $@ : 'OK';
     syslog('LOG_DEBUG', 'OILS: Patron->fine_items() ' . $log_status);
     return (defined $start and defined $end) ? 
-        [ $fines[($start-1)..($end-1)] ] : \@fines;
+        [ @fines[($start-1)..($end-1)] ] : \@fines;
 }
 
 # not currently supported