From 42e3c64e271bb90b57edc67db181f8db76d83b03 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 29 Apr 2014 17:55:01 +0000 Subject: [PATCH] Bug 11182: (follow-up) improve initialization of the $waiting_holds variable Rather than check whether it's defined, since its holding an integer, simply initialize it to 0. Signed-off-by: Galen Charlton --- circ/returns.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index 87fe21c4a0..208bb71fde 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -283,13 +283,13 @@ if ($barcode) { if (C4::Context->preference("WaitingNotifyAtCheckin") ) { #Check for waiting holds my @reserves = GetReservesFromBorrowernumber($borrower->{'borrowernumber'}); - my $waiting_holds; + my $waiting_holds = 0; foreach my $num_res (@reserves) { if ( $num_res->{'found'} eq 'W' && $num_res->{'branchcode'} eq $userenv_branch) { $waiting_holds++; } } - if ($waiting_holds && $waiting_holds > 0) { + if ($waiting_holds > 0) { $template->param( waiting_holds => $waiting_holds, holdsborrowernumber => $borrower->{'borrowernumber'}, -- 2.39.5