Bug 15416: Warns on guided_reports.pl

Initialising $phase variable to be '' if not defined.

To test:
1) Go to Reports -> Guided Reports Wizard
2) Notice warns
3) Apply patch
4) Refresh page
5) Confirm warns are gone and page still works as it should

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Warns are gone. Page still works as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch:
-my $phase = $input->param('phase');
-$phase //= '';
+my $phase = $input->param('phase') // '';

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 17c7c685f1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit fef0f0c367)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Aleisha 2016-01-18 03:30:44 +00:00 committed by Frédéric Demians
parent 559a8dbb59
commit aa35dbb2fc
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ Script to control the guided report creation
my $input = new CGI;
my $usecache = C4::Context->ismemcached;
my $phase = $input->param('phase');
my $phase = $input->param('phase') // '';
my $flagsrequired;
if ( $phase eq 'Build new' or $phase eq 'Delete Saved' ) {
$flagsrequired = 'create_reports';