Bug 16737 - Error when deleting EDIFACT message

If you try to delete an EDIFACT message it triggers an error:

Can't use string ("2") as a subroutine ref while "strict refs" in use at
/acqui/edifactmsgs.pl line 43.

Test Plan:
1) Attempt to delete an EDIFACT message
2) Note the error
3) Apply this patch
4) Attempt to delete an EDIFACT message again
5) Note it succeeds

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2016-06-14 18:05:53 +00:00
parent e5bb0fac3f
commit 1f2dcfd2e9
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
my $schema = Koha::Database->new()->schema();
my $cmd = $q->param('op');
if ( $cmd && $cmd == 'delete' ) {
my $id = $q->param->('message_id');
my $id = $q->param('message_id');
my $msg = $schema->resultset('EdifactMessage')->find($id);
$msg->deleted(1);
$msg->update;