Bug 21103

Summary: Fix parameter reuse in Elasticsearch/QueryBuilder.pm
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, mtompset
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 19604    
Bug Blocks:    
Attachments: Bug 21103: Declare new parameter for loop iterator

Description Nick Clemens (kidclamp) 2018-07-23 16:10:33 UTC
t/00-testcritic.t is failing on master

On line 318 we have:
foreach $val (@values) {

$val is a parameter passed in elsewhere, we should declare our own variable
Comment 1 Nick Clemens (kidclamp) 2018-07-23 16:12:46 UTC
Created attachment 77188 [details] [review]
Bug 21103: Declare new parameter for loop iterator

To test:
prove -v t/00-testcritic.t
it fails
apply patch
it passes
Comment 2 Mark Tompsett 2018-09-06 01:22:29 UTC
The third patch: "Bug 19604: Fix perlcritic "Loop iterator is not lexical" (1.20 KB, patch) 2018-07-31 11:22 UTC, Jonathan Druart" is a duplicate, except for variable names chosen.

*** This bug has been marked as a duplicate of bug 19604 ***