[Bug 8886] New: Uninitialized variable triggers error log entry in z3950_search.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 Priority: P5 - low Change sponsored?: --- Bug ID: 8886 Assignee: koha-bugs@lists.koha-community.org Summary: Uninitialized variable triggers error log entry in z3950_search.pl Severity: minor Classification: Unclassified OS: All Reporter: mtompset@hotmail.com Hardware: All Status: NEW Version: unspecified Component: Acquisitions Product: Koha If $frameworkcode and $op are not defined, it generates an error log entry. I confirmed that "|| q{}" was safe for $op, as there was only one place it was used. It is also safe for $frameworkcode, because it is impossible to enter nothing as a frameworkcode in biblio_framework. I checked back to biblio_framework because of the loop that does the "eq $frameworkcode" which floods the error log. The hashes are ultimately built from a select statement. This bug was discovered in 3.8.5, it applies to 3.6.x, 3.8.x, and master. Test Plan --------- 1) Login to staff client 2) Acquisitions 3) Search for a vendor (should exist) 4) enter a new basket (or existing basket) 5) "From an external source" 6) check error log file. There will be several errors like: [Sat Oct 06 20:09:37 2012] [error] [client 192.168.100.2] [Sat Oct 6 20:09:37 2012] z3950_search.pl: Use of uninitialized value $frameworkcode in string eq at /usr/share/koha/intranet/cgi-bin/acqui/z3950_search.pl line 100. And one like: [Sat Oct 06 20:09:37 2012] [error] [client 192.168.100.2] [Sat Oct 6 20:09:37 2012] z3950_search.pl: Use of uninitialized value $op in string ne at /usr/share/koha/intranet/cgi-bin/acqui/z3950_search.pl line 116. 7) apply patch 8) repeat steps, and those errors will not be generated. Patch(es) to follow. -- 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=8886 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 12723 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12723&action=edit Bug 8886 - Uninitialized variable triggers error log entry in z3950_search.pl Added "|| q{}" to the end of the declaration/initializations of both $op and $frameworkcode. This prevents n+1 error log entries, where n is the number of frameworks in biblio_framework. -- 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=8886 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |mtompset@hotmail.com |ity.org | -- 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=8886 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Hmmm... seems that some older patch has been applied... Corrected patch(es) to follow. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12723|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 13169 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13169&action=edit z3950_search reducing uninitialized variables error log entries This one is for master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 13170 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13170&action=edit z3950_search reducing uninitialized variables error log entries (3.8.x/3.6.x) This applies for 3.8.x and 3.6.x versions. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- I get the same errors before and after the patch (testing the one for master). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8886 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |DUPLICATE --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- In attempting to generate this issue again in master (3.11.x), some patch in the process of bug 9105 "fixed" the uninitialized variables. Though, "|| q{}" is friendlier to perl critic than "||''". *** This bug has been marked as a duplicate of bug 9105 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org