[Bug 15217] New: variables declared twice in in catalogue/search.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Bug ID: 15217 Summary: variables declared twice in in catalogue/search.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: colin.campbell@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org template borrowernumber and cookie are declared before use then declared again on first usage creating 3 unused variables that are almost immediately hidden -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |colin.campbell@ptfs-europe. | |com Status|NEW |Needs Signoff --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 45016 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45016&action=edit Proposed Patch Simple test: applying the patch removes the compile-time warnings displayed on perl -wc catalogue/search.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45016|0 |1 is obsolete| | --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 45017 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45017&action=edit Amended patch Added removal of declarations of two unused variables to patch to aid in decluttering the source -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Frédéric Demians <frederic@tamil.fr> 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=15217 --- Comment #3 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 45156 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45156&action=edit Bug 15217 Remove redundant duplicate var declaration remove superfluous second declaration of template, borrowernumber and cookie which are never used Also removed the variables @results and @results_array which are declared but not used Signed-off-by: Frédéric Demians <f.demians@tamil.fr> As suggested by Colin, perl -wc catalogue/search.pl doesn't complain anymore after applying the patch. perlcritic confirms the 2 variables were unused. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Attachment #45017|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small 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=15217 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45156|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 45208 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45208&action=edit [PASSED QA] Bug 15217 Remove redundant duplicate var declaration remove superfluous second declaration of template, borrowernumber and cookie which are never used Also removed the variables @results and @results_array which are declared but not used Signed-off-by: Frédéric Demians <f.demians@tamil.fr> As suggested by Colin, perl -wc catalogue/search.pl doesn't complain anymore after applying the patch. perlcritic confirms the 2 variables were unused. 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=15217 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |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=15217 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #45208|0 |1 is obsolete| | --- Comment #5 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 46056 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46056&action=edit Bug 15217 Remove redundant duplicate var declaration remove superfluous second declaration of template, borrowernumber and cookie which are never used Also removed the variables @results and @results_array which are declared but not used Signed-off-by: Frédéric Demians <f.demians@tamil.fr> As suggested by Colin, perl -wc catalogue/search.pl doesn't complain anymore after applying the patch. perlcritic confirms the 2 variables were unused. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m --- Comment #6 from Brendan Gallagher <brendan@bywatersolutions.com> --- pushed to master - thanks -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15217 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #8 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.8. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org