From cf26f61cad649641669e53a822bd6522bd59fb01 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 --- Koha/Patron.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 0c70f333d5a..758866a2ea8 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.40.0