From 656a25e39cac5ecca5c95dd9b2ae65648d474528 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Thu, 18 Aug 2016 14:14:47 +0200 Subject: [PATCH] Bug 17144: Fix variable scope issues in edi_account.pl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To reproduce: - In Staff client, go to Administration > EDI accounts - Click "+ New account" Result: Internal Server Error Plack error log says: Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157 To test: -Apply patch - Add an EDI account - Edit an EDI account - Delete an EDI account Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit a055abe7c06e2efc9f0cdae89c2cbef28b7f3cb3) Signed-off-by: Frédéric Demians --- admin/edi_accounts.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/edi_accounts.pl b/admin/edi_accounts.pl index 5f963bd4c0..d084b71da2 100755 --- a/admin/edi_accounts.pl +++ b/admin/edi_accounts.pl @@ -25,9 +25,10 @@ use C4::Output; use Koha::Database; use Koha::Plugins; -my $input = CGI->new(); +our $input = CGI->new(); +our $schema = Koha::Database->new()->schema(); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( +our ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => 'admin/edi_accounts.tt', query => $input, @@ -39,7 +40,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $op = $input->param('op'); $op ||= 'display'; -my $schema = Koha::Database->new()->schema(); if ( $op eq 'acct_form' ) { show_account(); -- 2.39.5