https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42565

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 198858
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198858&action=edit
Bug 42565: Fix uninitialized value warning in GetIssuingCharges

GetIssuingCharges overwrites its initial $charge = 0 with the value of
itemtypes.rentalcharge, which is NULL when no rental charge is configured.
This causes 'uninitialized value' warnings in every caller that compares
$charge > 0 (automatic renewals, SIP checkout/renew, OPAC).

The fix normalizes NULL to 0 at the source, which is semantically correct:
NULL rentalcharge means 'no charge', same as 0. All callers already treat
the return value as numeric, so this is safe.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Circulation.t
   => SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomás Cohen Arazi <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to