Bug 6503 - Variable $sth is declared 3 times (with keyword "my") in "makepayment" sub of "Accounts.pm"
Summary: Variable $sth is declared 3 times (with keyword "my") in "makepayment" sub of...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) minor (vote)
Assignee: Kyle M Hall
QA Contact: Bugs List
URL:
Keywords:
: 6469 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-14 15:59 UTC by Ricardo Dias Marques
Modified: 2013-12-05 20:04 UTC (History)
5 users (show)

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


Attachments
Patch to fix Bug 6503 (76 bytes, text/plain)
2011-06-14 16:32 UTC, Ricardo Dias Marques
Details
Bug 6503 - Variable $sth is declared 3 times (with keyword "my") in "makepayment" sub of "Accounts.pm" (2.11 KB, patch)
2011-06-14 22:44 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Dias Marques 2011-06-14 15:59:22 UTC
In the code available today (14-Jun-2011), in Koha git's "master" branch, the file "Accounts.pm" (in the "C4" directory) has the variable "$sth" declared 3 times in the "makepayment" sub. 

This causes the following warnings to appear when running "make test" in Koha installation, for several tests:

t/Heading.t ......................... "my" variable $sth masks earlier declaration in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 172.
"my" variable $sth masks earlier declaration in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 188.
[...]
t/ILSDI_Services.t .................. "my" variable $sth masks earlier declaration in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 172.
"my" variable $sth masks earlier declaration in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 188.

[...etc...]


Therefore, I'm removing the "my" keyword from the declarations of "$sth" in lines 172 and 188 of "Accounts.pm".

Patch will follow shortly.
Comment 1 Ricardo Dias Marques 2011-06-14 16:32:29 UTC
Created attachment 4453 [details]
Patch to fix Bug 6503

Proposed patch in the above link to fix this bug 6503.
Comment 2 Chris Cormack 2011-06-14 22:44:28 UTC
Created attachment 4467 [details] [review]
Bug 6503 - Variable $sth is declared 3 times (with keyword "my") in "makepayment" sub of "Accounts.pm"

In the code available today (14-Jun-2011), in Koha git's "master" branch,
the file "Accounts.pm" (in the "C4" directory) has the variable "$sth"
declared 3 times in the "makepayment" sub. This causes the following
warnings to appear when running "make test" in Koha installation, for
several tests:
t/Heading.t ......................... "my" variable $sth masks earlier declaration
in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 172.
"my" variable $sth masks earlier declaration in same scope at
kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 188.
[...]
t/ILSDI_Services.t .................. "my" variable $sth masks earlier declaration
in same scope at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 172.
"my" variable $sth masks earlier declaration in same scope
at kohaclone/blib/PERL_MODULE_DIR/C4/Accounts.pm line 188.
[...etc...]

Therefore, I'm removing the "my" keyword from the declarations of "$sth"
in lines 172 and 188 of "Accounts.pm".

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 3 Ian Walls 2011-07-15 02:54:19 UTC
Simple change, easy to read, marking as Passed QA
Comment 4 Chris Cormack 2011-07-17 08:42:30 UTC
Pushed, please test
Comment 5 Magnus Enger 2011-07-28 09:09:25 UTC
*** Bug 6469 has been marked as a duplicate of this bug. ***
Comment 6 Jared Camins-Esakov 2012-12-31 00:02:57 UTC
There have been no further reports of problems so I am marking this bug resolved.