From 25f3c67032c1b9be806fd05d1bb20ddc16e98348 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 6 Sep 2016 13:53:02 -0400 Subject: [PATCH] LP#1620750 Prevent log warning for uninit var in checkin_retarget() If the retarget_mode variable is not initialized, then a warning is generated in the logs every time an item is checked in. Avoid the warning by short-circuiting before testing the value in the regex. Signed-off-by: Dan Scott --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index dcef1d2e4d..455ce5bf51 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -2223,7 +2223,7 @@ sub check_transit_checkin_interval { # Retarget local holds at checkin sub checkin_retarget { my $self = shift; - return unless $self->retarget_mode =~ m/retarget/; # Retargeting? + return unless $self->retarget_mode and $self->retarget_mode =~ m/retarget/; # Retargeting? return unless $self->is_checkin; # Renewals need not be checked return if $self->capture eq 'nocapture'; # Not capturing holds anyway? Move on. return if $self->is_precat; # No holds for precats -- 2.11.0