From 478d23efa5884a25cb1bc6d47f4965f78fb5f4e6 Mon Sep 17 00:00:00 2001 From: Zack Galbreath Date: Fri, 13 Nov 2020 09:31:00 -0500 Subject: [PATCH] Define $status even when an exception gets thrown Fixes #1083 --- app/cdash/include/Messaging/Notification/Email/Mail.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/cdash/include/Messaging/Notification/Email/Mail.php b/app/cdash/include/Messaging/Notification/Email/Mail.php index 0fbd480c57..4a26a29f9d 100644 --- a/app/cdash/include/Messaging/Notification/Email/Mail.php +++ b/app/cdash/include/Messaging/Notification/Email/Mail.php @@ -132,6 +132,7 @@ public function send(EmailMessage $message) try { $status = $swift_mailer->send($swift_message, $failed_recipients); } catch (\Exception $e) { + $status = 0; $log = Log::getInstance(); $log->add_log($e->getMessage(), __METHOD__); }