From 5be44470a534b6209895385a493525dcaec96881 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Mon, 15 May 2023 16:08:09 +0200 Subject: [PATCH] Bug 32092: Fix uninitialized value in addition Signed-off-by: Kyle M Hall --- Koha/Patron.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index cb5419c1cd6..b73107c2bba 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1256,15 +1256,15 @@ sub article_request_fee { $library_id //= C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; - my $fee = Koha::CirculationRules->get_effective_rule_value( + my $value = Koha::CirculationRules->get_effective_rule_value( { branchcode => $library_id, categorycode => $self->categorycode, rule_name => 'article_request_fee' } - ) + 0; + ); - return $fee; + return $value ? $value + 0 : 0; } =head3 add_article_request_fee_if_needed -- 2.42.0