Summary: | Uninitialized variable triggers error log entry in smart_rules.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Tompsett <mtompset> |
Component: | Circulation | Assignee: | Mark Tompsett <mtompset> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | trivial | ||
Priority: | P5 - low | CC: | chris, gmcharlt, kyle.m.hall, paul.poulain, veron |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Added "|| q{}" into variable declaration/initialization
[SIGNED-OFF] Bug 8772 - Uninitialized variable triggers error log entry in smart_rules.pl |
Description
Mark Tompsett
2012-09-14 17:17:11 UTC
Created attachment 12318 [details] [review] Added "|| q{}" into variable declaration/initialization Pretty simple to test. Follow the test plan above. Just clicking a link triggers the error log entries without the patch. This bug applies to 3.6.x, 3.8.x, and master. This patch is against master. Let me know if it doesn't apply back to 3.6.x or 3.8.x, and I'll post up a patch. Created attachment 12320 [details] [review] [SIGNED-OFF] Bug 8772 - Uninitialized variable triggers error log entry in smart_rules.pl Changed declartion from: my $op = $input->param('op'); to my $op = $input->param('op') || q{}; in order to give an empty string default preventing error logs from filling needlessly. Signed-off-by: Marc Veron <veron@veron.ch> The patch removes warnings like: Use of uninitialized value $op in string eq at... However there is one more warning, but it is not related to $op (addressed by this patch): smart-rules.pl: Use of uninitialized value in string ne at .../admin/smart-rules.pl line 388. QA comment: * tiny & trivial patch, that just silence a warn * passes koha-qa.pl passed QA Patch pushed to master. Still 2 warns, but not related to this patch: Use of uninitialized value in string ne at /home/paul/koha.dev/koha-community/admin/smart-rules.pl line 388. Use of uninitialized value in sprintf at /home/paul/koha.dev/koha-community/admin/smart-rules.pl line 387. Pushed to 3.8.x, will be in 3.8.6 |