From 3599e0001db2b405655c348d2b8c94bd15769fd2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 Oct 2020 09:32:16 +0200 Subject: [PATCH] Bug 26529: Remove warning Use of uninitialized value $rule_value in string eq Signed-off-by: Jonathan Druart --- Koha/CirculationRules.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index 5b63998a8b..743d8f1ab3 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -282,7 +282,7 @@ sub set_rule { my $rule_name = $params->{rule_name}; my $rule_value = $params->{rule_value}; my $can_be_blank = defined $kind_info->{can_be_blank} ? $kind_info->{can_be_blank} : 1; - $rule_value = undef if $rule_value eq "" && !$can_be_blank; + $rule_value = undef if $rule_value && $rule_value eq "" && !$can_be_blank; for my $v ( $branchcode, $categorycode, $itemtype ) { $v = undef if $v and $v eq '*'; -- 2.39.5