From 605516c4ea3680b0d8bb31e4e248d54a69bacfab Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 14 Jun 2016 18:05:53 +0000 Subject: [PATCH] Bug 16737 - Error when deleting EDIFACT message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit 1f2dcfd2e93dc444cc92e62cd8be2dbb29f7cb08) Signed-off-by: Frédéric Demians --- acqui/edifactmsgs.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/edifactmsgs.pl b/acqui/edifactmsgs.pl index 0498b3dafd..2a9a7af034 100755 --- a/acqui/edifactmsgs.pl +++ b/acqui/edifactmsgs.pl @@ -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; -- 2.39.5