Summary: | Warnings "use of uninitialized value" on branchoverdues.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Peter Vashchuk <stalkernoid> |
Component: | Circulation | Assignee: | Peter Vashchuk <stalkernoid> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, david, fridolin.somers, gmcharlt, kyle.m.hall, nugged, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the cause of unnecessary "use of uninitialized value" warnings in the log files generated by Circulation > Overdues with fines (/cgi-bin/koha/circ/branchoverdues.pl).
This was caused by not taking into account that the "location" parameter for this form is initially empty.
|
Version(s) released in: |
21.05.00, 20.11.03,20.05.09,19.11.15
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 25790 | ||
Attachments: |
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl Bug 27548: "use of uninitialized value" warning on branchoverdues.pl |
Description
Peter Vashchuk
2021-01-25 15:34:12 UTC
Created attachment 115781 [details] [review] Bug 27548: "use of uninitialized value" warning on branchoverdues.pl On the beginning we have empty "location" parameter for this form, but that not taken into account in comparison and undef warning emitted: "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl Fixed by adding pre-check for $location. To reproduce: 1) Head over to "Circulation ->Overdues with fines" page. Check intranet-error.log where there will be many warnings "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72". 2) Apply the patch, refresh the "Overdues with fines" page. 3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console. Created attachment 115794 [details] [review] Bug 27548: "use of uninitialized value" warning on branchoverdues.pl On the beginning we have empty "location" parameter for this form, but that not taken into account in comparison and undef warning emitted: "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl Fixed by adding pre-check for $location. To reproduce: 1) Head over to "Circulation ->Overdues with fines" page. Check intranet-error.log where there will be many warnings "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72". 2) Apply the patch, refresh the "Overdues with fines" page. 3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console. Signed-off-by: David Nind <david@davidnind.com> Testing notes: - When using koha-testing-docker the warnings are logged to /var/log/koha/kohadev/plack-intranet-error.log Created attachment 116099 [details] [review] Bug 27548: "use of uninitialized value" warning on branchoverdues.pl On the beginning we have empty "location" parameter for this form, but that not taken into account in comparison and undef warning emitted: "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl Fixed by adding pre-check for $location. To reproduce: 1) Head over to "Circulation ->Overdues with fines" page. Check intranet-error.log where there will be many warnings "Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72". 2) Apply the patch, refresh the "Overdues with fines" page. 3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> I've reformatted the commit message a little bit for better readability on command line (adding line breaks). Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.03 Pushed to 20.05.x for 20.05.09 Backported: Pushed to 19.11.x branch for 19.11.15 |