fix(protocol-smtp): fixed chomp on undefined variable (#5377)

Refs: CTOR-1197
This commit is contained in:
omercier 2025-01-06 17:24:05 +01:00 committed by GitHub
parent bba20e5f12
commit 92473a4b02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

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