From 2a06f9be43184c12e37e2cca0057b7584d8610bd Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 25 Jan 2018 12:01:30 +0100 Subject: [PATCH] Bug 20088: Fix uninitialized warning from svc/holds Use of uninitialized value in array element at svc/holds line 56. Test plan: Check if the warn is no longer in the logs; the warning is triggered by an ajax call from the circulation template in staff. Signed-off-by: Mark Tompsett Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- svc/holds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svc/holds b/svc/holds index 5c0ed35cc6..062109d40c 100755 --- a/svc/holds +++ b/svc/holds @@ -54,8 +54,8 @@ my $borrowernumber = $input->param('borrowernumber'); my $offset = $input->param('iDisplayStart'); my $results_per_page = $input->param('iDisplayLength'); my $sorting_direction = $input->param('sSortDir_0') || 'desc'; -my $sorting_column = $sort_columns[ $input->param('iSortCol_0') ] - || 'reservedate'; +my $iSortCol = $input->param('iSortCol_0') // 0; +my $sorting_column = $sort_columns[$iSortCol] // 'reservedate'; binmode STDOUT, ":encoding(UTF-8)"; print $input->header( -type => 'text/plain', -charset => 'UTF-8' ); -- 2.39.5