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:
parent
ca48667fc6
commit
42e3c64e27
|
|
@ -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'},
|
||||
|
|
|
|||
Loading…
Reference in New Issue