Bug 15217

Summary: variables declared twice in in catalogue/search.pl
Product: Koha Reporter: Colin Campbell <colin.campbell>
Component: SearchingAssignee: Colin Campbell <colin.campbell>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: brendan, f.demians, julian.maurice, katrin.fischer
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed Patch
Amended patch
Bug 15217 Remove redundant duplicate var declaration
[PASSED QA] Bug 15217 Remove redundant duplicate var declaration
Bug 15217 Remove redundant duplicate var declaration

Description Colin Campbell 2015-11-19 14:16:02 UTC
template borrowernumber and cookie are declared before use then declared again on first usage creating 3 unused variables that are almost immediately hidden
Comment 1 Colin Campbell 2015-11-19 14:22:38 UTC Comment hidden (obsolete)
Comment 2 Colin Campbell 2015-11-19 14:36:11 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2015-11-25 16:11:16 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2015-11-27 10:58:57 UTC Comment hidden (obsolete)
Comment 5 Brendan Gallagher 2015-12-30 02:38:12 UTC
Created attachment 46056 [details] [review]
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>
Comment 6 Brendan Gallagher 2015-12-30 02:38:24 UTC
pushed to master - thanks
Comment 7 Julian Maurice 2015-12-31 08:29:16 UTC
Patch pushed to 3.22.x, will be in 3.22.2
Comment 8 Frédéric Demians 2015-12-31 18:27:55 UTC
This patch has been pushed to 3.20.x, will be in 3.20.8.