From 92473a4b021acb4600e7f81f2ecf34bdf5876738 Mon Sep 17 00:00:00 2001 From: omercier <32134301+omercier@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:24:05 +0100 Subject: [PATCH] fix(protocol-smtp): fixed chomp on undefined variable (#5377) Refs: CTOR-1197 --- src/apps/protocols/smtp/lib/smtp.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/protocols/smtp/lib/smtp.pm b/src/apps/protocols/smtp/lib/smtp.pm index ca0cdd5c8..cbd1c52e9 100644 --- a/src/apps/protocols/smtp/lib/smtp.pm +++ b/src/apps/protocols/smtp/lib/smtp.pm @@ -127,7 +127,7 @@ sub connect { $self->{output}->exit(); } if ($smtp_handle == -1) { - chomp $stdout; + chomp $stdout if (defined($stdout)); $self->{output}->output_add( severity => $connection_exit, short_msg => 'Unable to connect to SMTP: ' . (defined($stdout) ? $stdout : $error_msg)