From cc6fc0800cb3446ebe482b7dbb2f6ec4a543d869 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Mon, 8 Aug 2016 16:13:37 +0100 Subject: [PATCH] Bug 17081 Incorrect comparison operator used in edifactmsgs.pl Numeric comparison operator is used where string comparison required, resulting in the following warning in the log: 'Argument "delete" isn't numeric in numeric eq (==).' This patch corrects it to use 'eq' not '==' to compare strings. To test, apply the patch and go to Acquisitions -> EDIFACT messages. Delete an EDIFACT message. There should be no error in the error log. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- acqui/edifactmsgs.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acqui/edifactmsgs.pl b/acqui/edifactmsgs.pl index 2a9a7af034..608eaff0a9 100755 --- a/acqui/edifactmsgs.pl +++ b/acqui/edifactmsgs.pl @@ -39,7 +39,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' ) { +if ( $cmd && $cmd eq 'delete' ) { my $id = $q->param('message_id'); my $msg = $schema->resultset('EdifactMessage')->find($id); $msg->deleted(1); -- 2.39.5