[Bug 14344] New: uninitialized value warning C4/Utils/DataTables/Members.pm
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Bug ID: 14344 Summary: uninitialized value warning C4/Utils/DataTables/Members.pm Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org On a clean dev install in master, if you search for a user, say 'acevedo' you will get a warning in the logs: [Fri Jun 05 11:25:01.173014 2015] [cgi:error] [pid 13536] [client 127.0.0.1:51033] AH01215: [Fri Jun 5 11:25:01 2015] circulation.pl: Use of uninitialized value $searchtype in string eq at /home/tcohen/git/koha-community-src/C4/Utils/DataTables/Members.pm line 78., referer: http://koha-dev.biblioadmin/cgi-bin/koha/mainpage.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 39911 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39911&action=edit Bug 14344: uninitialized value warning C4/Utils/DataTables/Members.pm The condition for the assignment depends on $searchtype to be defined and equal to 'contains'. So this change doesn't change the semantics. - if $term !~ /^%/ - and $searchtype eq "contain"; + if (defined $searchtype) && $searchtype eq "contain" + && $term !~ /^%/; To test: - In current master, search for a user (I searched 'acevedo') on the intranet interface. - Look at the intranet logs => FAIL: you get "Use of uninitialized value $searchtype in string eq at.,," - Apply the patch - Repeat the search => SUCCESS: No warning - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39911|0 |1 is obsolete| | --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39914 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39914&action=edit Bug 14344: uninitialized value warning C4/Utils/DataTables/Members.pm The condition for the assignment depends on $searchtype to be defined and equal to 'contains'. So this change doesn't change the semantics. - if $term !~ /^%/ - and $searchtype eq "contain"; + if (defined $searchtype) && $searchtype eq "contain" + && $term !~ /^%/; To test: - Home -> Circulation -> Checkout - Search for a user that does not exist (I searched 'whywouldthisexist') on the intranet interface. - Look at the intranet logs => FAIL: you get "Use of uninitialized value $searchtype in string eq at.,," - Apply the patch - Repeat the search => SUCCESS: No warning - Sign off :-D NOTE: Other pages are more forgiving. Tweaked test plan. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39914|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 39937 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39937&action=edit [PASSED QA] Bug 14344: uninitialized value warning C4/Utils/DataTables/Members.pm The condition for the assignment depends on $searchtype to be defined and equal to 'contains'. So this change doesn't change the semantics. - if $term !~ /^%/ - and $searchtype eq "contain"; + if (defined $searchtype) && $searchtype eq "contain" + && $term !~ /^%/; To test: - Home -> Circulation -> Checkout - Search for a user that does not exist (I searched 'whywouldthisexist') on the intranet interface. - Look at the intranet logs => FAIL: you get "Use of uninitialized value $searchtype in string eq at.,," - Apply the patch - Repeat the search => SUCCESS: No warning - Sign off :-D NOTE: Other pages are more forgiving. Tweaked test plan. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #6 from Liz Rea <wizzyrea@gmail.com> --- Patch pushed to 3.18.x will be in 3.18.08 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14436 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14344 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #7 from Mason James <mtj@kohaaloha.com> --- Skipping for 3.16.x series, due to patch conflicts -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org