Bug 17144: Fix variable scope issues in edi_account.pl

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 <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marc Véron 2016-08-18 14:14:47 +02:00 committed by Kyle M Hall
parent 53f8916fe7
commit a055abe7c0
1 changed files with 3 additions and 3 deletions

View File

@ -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();