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 <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2014-04-29 17:55:01 +00:00
parent ca48667fc6
commit 42e3c64e27
1 changed files with 2 additions and 2 deletions

View File

@ -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'},