From fb615a17063c80394008416f2b275be6822ae804 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 3cabb307f5..4a8df56d8d 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1088,15 +1088,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.30.2