Summary: | Warning in C4::Members::patronflags | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize <martin.renvoize> |
Component: | Architecture, internals, and plumbing | Assignee: | Martin Renvoize <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Joonas Kylmälä <joonas.kylmala> |
Severity: | minor | ||
Priority: | P5 - low | CC: | andrewfh, fridolin.somers, joonas.kylmala, victor |
Version: | master | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.05,20.05.11
|
|
Attachments: |
Bug 28053: Squash warning in C4::Members
Bug 28053: Squash warning in C4::Members Bug 28053: Squash warning in C4::Members |
Description
Martin Renvoize
2021-03-30 11:15:06 UTC
Created attachment 118989 [details] [review] Bug 28053: Squash warning in C4::Members This patch sets guarantess_non_issues_charges to '0' upon creation of the variable and thus prevents 'Use of uninitialized value $guarantees_non_issues_charges in numeric gt (>) at /home/martin/kohaclone/C4/Members.pm line 183.' being thrown when the patron has guaruntees without any charges. Test plan 1. Run t/db_dependant/SIP/SIPServer.t and note the warning above is thrown at least once. 2. Apply the patch 3. Run the test again and note the warning has gone. Created attachment 118995 [details] [review] Bug 28053: Squash warning in C4::Members This patch sets guarantess_non_issues_charges to '0' upon creation of the variable and thus prevents 'Use of uninitialized value $guarantees_non_issues_charges in numeric gt (>) at /home/martin/kohaclone/C4/Members.pm line 183.' being thrown when the patron has guaruntees without any charges. Test plan 1. Run t/db_dependent/SIP/SIPServer.t and note the warning above is thrown at least once. 2. Apply the patch 3. Run the test again and note the warning has gone. Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Created attachment 119063 [details] [review] Bug 28053: Squash warning in C4::Members This patch sets guarantess_non_issues_charges to '0' upon creation of the variable and thus prevents 'Use of uninitialized value $guarantees_non_issues_charges in numeric gt (>) at /home/martin/kohaclone/C4/Members.pm line 183.' being thrown when the patron has guaruntees without any charges. Test plan 1. Run t/db_dependant/SIP/SIPServer.t and note the warning above is thrown at least once. 2. Apply the patch 3. Run the test again and note the warning has gone. Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> It was not mentioned in the test plan but NoIssuesChargeGuarantees needs to be defined for the warning to trigger. Passing QA. Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.05 Pushed to 20.05.x for 20.05.11 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |