LP#1667497 - Define $params{depth} to avoid uninitialized warning. user/stompro/lp1667497_set_depth_undefied_log_noise
authorJosh Stompro <stompro@stompro.org>
Mon, 4 Mar 2019 14:57:02 +0000 (08:57 -0600)
committerJosh Stompro <stompro@stompro.org>
Mon, 4 Mar 2019 14:57:02 +0000 (08:57 -0600)
$depth is set to 0 if $params{depth} is unset, but then $params{depth}
gets used later on, which causes an uninitialized value warning.

So set $params{depth} to whatever $depth was set to.

Signed-off-by: Josh Stompro <stompro@stompro.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index 7786850..1e57e9a 100644 (file)
@@ -2381,6 +2381,7 @@ sub check_title_hold {
 
     my %params       = %$params;
     my $depth        = $params{depth}        || 0;
+    $params{depth} = $depth;   #define $params{depth} if unset, since it gets used later
     my $selection_ou = $params{selection_ou} || $params{pickup_lib};
     my $oargs        = $params{oargs}        || {};