[Bug 30815] New: Use of uninitialized value $charge in numeric gt (>) at /usr/share/koha/lib/C4/Circulation.pm
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Bug ID: 30815 Summary: Use of uninitialized value $charge in numeric gt (>) at /usr/share/koha/lib/C4/Circulation.pm Change sponsored?: --- Product: Koha Version: 20.11 Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Blocks: 25798 The code on 20.11.17 is: # Charge a new rental fee, if applicable my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); if ( $charge > 0 ) { AddIssuingCharge($issue, $charge, 'RENT_RENEW'); } But it's the same on current master. The line given is the if-clause in line 3171. The default for rentalcharge and rentalcharge_daily in itemtypes is NULL, maybe that's the cause? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25798 [Bug 25798] Copyright year to Holds to pull report -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|25798 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25798 [Bug 25798] Copyright year to Holds to pull report -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 --- Comment #1 from Lari Taskula <lari.taskula@hypernova.fi> --- Created attachment 196726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196726&action=edit Bug 30815: Fix use of uninitialized value $charge Fixes Use of uninitialized value $charge in numeric gt (>) at /usr/share/koha/lib/C4/Circulation.pm -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lari.taskula@hypernova.fi --- Comment #2 from Lari Taskula <lari.taskula@hypernova.fi> --- Seeing this in our automatic renewals cron logs. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 --- Comment #3 from Lari Taskula <lari.taskula@hypernova.fi> --- I think the proper fix would be to make GetIssuingCharges() return 0 so that $charge would always be defined, but I don't want to risk causing regression elsewhere so that's why my proposed patch is as it is. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lari.taskula@hypernova.fi |ity.org | CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Could we get a test plan please? Not sure how to reproduce the error (had a go at renewing an item with a rental charge, or with 0.00, but no errors in the log). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Olivier Hubert <olivier.hubert@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olivier.hubert@inlibro.com --- Comment #5 from Olivier Hubert <olivier.hubert@inlibro.com> --- I don't know how the second bug was opened while this one already existed, but bug #42565 is already signed off twice so I think this one should be closed in favour of #42565. Also, the solution implemented in #42565 is more generic, catches all the times that $charge is used and adds the appropriate tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Lari, can you check and mark as duplicate if you agree? Easy to miss a bug in search, it happens :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30815 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |DUPLICATE --- Comment #7 from Lari Taskula <lari.taskula@hypernova.fi> --- *** This bug has been marked as a duplicate of bug 42565 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org