Bug 15217 - variables declared twice in in catalogue/search.pl
Summary: variables declared twice in in catalogue/search.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Colin Campbell
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 14:16 UTC by Colin Campbell
Modified: 2017-06-14 22:05 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed Patch (815 bytes, patch)
2015-11-19 14:22 UTC, Colin Campbell
Details | Diff | Splinter Review
Amended patch (1.64 KB, patch)
2015-11-19 14:36 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 15217 Remove redundant duplicate var declaration (1.94 KB, patch)
2015-11-25 16:11 UTC, Frédéric Demians
Details | Diff | Splinter Review
[PASSED QA] Bug 15217 Remove redundant duplicate var declaration (2.01 KB, patch)
2015-11-27 10:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15217 Remove redundant duplicate var declaration (2.06 KB, patch)
2015-12-30 02:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.