[Bug 8772] New: Uninitialized variable triggers error log entry in smart_rules.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 Priority: P5 - low Change sponsored?: --- Bug ID: 8772 CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: Uninitialized variable triggers error log entry in smart_rules.pl Severity: trivial Classification: Unclassified OS: All Reporter: mtompset@hotmail.com Hardware: All Status: NEW Version: unspecified Component: Circulation Product: Koha Test ---- 1) Login 2) Go to administration 3) Circulations and Fines 4) tail /var/log/koha/... There's now several uninitialized $op variables. 5) apply a patch that changes line 47 (where the my $op) is to have "|| q{}" 6) retest no errors. Sorry, it's late. No time for a patch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |mtompset@hotmail.com |ity.org | --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 12318 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12318&action=edit 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12318|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 12320 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12320&action=edit [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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * tiny & trivial patch, that just silence a warn * passes koha-qa.pl passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|unspecified |rel_3_8 --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8772 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x, will be in 3.8.6 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org