Summary: | reserves_stats.pl is not plack safe | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | f.demians, julian.maurice, kyle, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13914 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 7172, 17253 | ||
Attachments: |
Bug 17294: Make reserves_stats.pl plack safe
Bug 17294: Make reserves_stats.pl plack safe Bug 17294: Make reserves_stats.pl plack safe [PASSED QA] Bug 17294: Make reserves_stats.pl plack safe |
Description
Jonathan Druart
2016-09-13 08:42:47 UTC
Created attachment 55516 [details] [review] Bug 17294: Make reserves_stats.pl plack safe Lot of errors are raised by this script under plack because of var scope issues: Variable "$ccodes" is not available at /home/koha/src/reports/reserves_stats.pl line 337. Variable "$locations" is not available at /home/koha/src/reports/reserves_stats.pl line 338. Variable "$itemtypes" is not available at /home/koha/src/reports/reserves_stats.pl line 339. Variable "$Bsort1" is not available at /home/koha/src/reports/reserves_stats.pl line 344. Variable "$Bsort2" is not available at /home/koha/src/reports/reserves_stats.pl line 350. Variable "@patron_categories" is not available at /home/koha/src/reports/reserves_stats.pl line 356. The lazy way to fix that is that reinit them from the subroutines they are used. Test plan: Execute the report, after this patch applied you won't see the error in the log. Created attachment 55518 [details] [review] Bug 17294: Make reserves_stats.pl plack safe Lot of errors are raised by this script under plack because of var scope issues: Variable "$ccodes" is not available at /home/koha/src/reports/reserves_stats.pl line 337. Variable "$locations" is not available at /home/koha/src/reports/reserves_stats.pl line 338. Variable "$itemtypes" is not available at /home/koha/src/reports/reserves_stats.pl line 339. Variable "$Bsort1" is not available at /home/koha/src/reports/reserves_stats.pl line 344. Variable "$Bsort2" is not available at /home/koha/src/reports/reserves_stats.pl line 350. Variable "@patron_categories" is not available at /home/koha/src/reports/reserves_stats.pl line 356. The lazy way to fix that is that reinit them from the subroutines they are used. Test plan: Execute the report, after this patch applied you won't see the error in the log. Created attachment 55626 [details] [review] Bug 17294: Make reserves_stats.pl plack safe Lot of errors are raised by this script under plack because of var scope issues: Variable "$ccodes" is not available at /home/koha/src/reports/reserves_stats.pl line 337. Variable "$locations" is not available at /home/koha/src/reports/reserves_stats.pl line 338. Variable "$itemtypes" is not available at /home/koha/src/reports/reserves_stats.pl line 339. Variable "$Bsort1" is not available at /home/koha/src/reports/reserves_stats.pl line 344. Variable "$Bsort2" is not available at /home/koha/src/reports/reserves_stats.pl line 350. Variable "@patron_categories" is not available at /home/koha/src/reports/reserves_stats.pl line 356. The lazy way to fix that is that reinit them from the subroutines they are used. Test plan: Execute the report, after this patch applied you won't see the error in the log. Signed-off-by: Marc Véron <veron@veron.ch> Hm, something wrong with Plack in my kohadevbox :( Figured out my kohadevbox problem, was able to test this now. Created attachment 55804 [details] [review] [PASSED QA] Bug 17294: Make reserves_stats.pl plack safe Lot of errors are raised by this script under plack because of var scope issues: Variable "$ccodes" is not available at /home/koha/src/reports/reserves_stats.pl line 337. Variable "$locations" is not available at /home/koha/src/reports/reserves_stats.pl line 338. Variable "$itemtypes" is not available at /home/koha/src/reports/reserves_stats.pl line 339. Variable "$Bsort1" is not available at /home/koha/src/reports/reserves_stats.pl line 344. Variable "$Bsort2" is not available at /home/koha/src/reports/reserves_stats.pl line 350. Variable "@patron_categories" is not available at /home/koha/src/reports/reserves_stats.pl line 356. The lazy way to fix that is that reinit them from the subroutines they are used. Test plan: Execute the report, after this patch applied you won't see the error in the log. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Pushed to master for 16.11, thanks Jonathan! Pushed in 16.05. Will be in 16.05.05. Pushed to 3.22.x, will be in 3.22.12 |