Variable "$period" is not available at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/bo rrowers_stats.pl line 375. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/bo rrowers_stats.pl line 376.
Created attachment 14763 [details] [review] Bug 9451: Quiet warnings and Plackify borrower_stats.pl There are several warnings and one non-Plack-compatible variable in reports/borrower_stats.pl. To test: 1) Apply patch 2) Use the borrower report wizard to create a report that includes an extended patron attribute. 3) Check the logs, and make sure that you don't see any of the following messages: Variable "$period" is not available at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 375. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 376.
Created attachment 15153 [details] [review] Bug 9451: Quiet warnings and Plackify borrower_stats.pl There are several warnings and one non-Plack-compatible variable in reports/borrower_stats.pl. To test: 1) Apply patch 2) Use the borrower report wizard to create a report that includes an extended patron attribute. 3) Check the logs, and make sure that you don't see any of the following messages: Variable "$period" is not available at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 375. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 376. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
QA comment: Looks good. The patch removes some warning in the log file under Plack. No behavior changed under Apache. Note: some others warnings still exist (subroutine foo redefined). Marked as Passed QA.
Created attachment 15157 [details] [review] Bug 9451: Quiet warnings and Plackify borrower_stats.pl There are several warnings and one non-Plack-compatible variable in reports/borrower_stats.pl. To test: 1) Apply patch 2) Use the borrower report wizard to create a report that includes an extended patron attribute. 3) Check the logs, and make sure that you don't see any of the following messages: Variable "$period" is not available at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 375. Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 376. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch has been pushed to master.
Pushed to 3.10.x will be in 3.10.3
Comment on attachment 15157 [details] [review] Bug 9451: Quiet warnings and Plackify borrower_stats.pl Review of attachment 15157 [details] [review]: ----------------------------------------------------------------- ::: reports/borrowers_stats.pl @@ +56,4 @@ > $filters[3]=format_date_in_iso($filters[3]); > $filters[4]=format_date_in_iso($filters[4]); > my $digits = $input->param("digits"); > +our $period = $input->param("period"); Hmm, i still think our is kinda hacky, but it works