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 <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:
Colin Campbell 2016-08-08 16:13:37 +01:00 committed by Kyle M Hall
parent 0ef3b19dbd
commit cc6fc0800c
1 changed files with 1 additions and 1 deletions

View File

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