Bug 16737 - Error when deleting EDIFACT message
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Jun 2016 18:05:53 +0000 (18:05 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 24 Jun 2016 12:04:03 +0000 (12:04 +0000)
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>
acqui/edifactmsgs.pl

index 0498b3d..2a9a7af 100755 (executable)
@@ -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;