From be8b7c9ebac76daa1475546821fc7dbf01f9fa30 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 20 Jan 2019 06:56:23 -0800 Subject: [PATCH] Fix "Welcome Mail" check for a message when no message exists Summary: Fixes T13239. See that task for discussion. Test Plan: Tried to send welcome mail with no "Welcome" message. Maniphest Tasks: T13239 Differential Revision: https://secure.phabricator.com/D20001 --- .../people/controller/PhabricatorPeopleWelcomeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/people/controller/PhabricatorPeopleWelcomeController.php b/src/applications/people/controller/PhabricatorPeopleWelcomeController.php index 3fb75265ff..94d5e0bb03 100644 --- a/src/applications/people/controller/PhabricatorPeopleWelcomeController.php +++ b/src/applications/people/controller/PhabricatorPeopleWelcomeController.php @@ -51,7 +51,7 @@ final class PhabricatorPeopleWelcomeController $default_message = PhabricatorAuthMessage::loadMessage( $admin, PhabricatorAuthWelcomeMailMessageType::MESSAGEKEY); - if (strlen($default_message->getMessageText())) { + if ($default_message && strlen($default_message->getMessageText())) { $message_instructions = pht( 'The email will identify you as the sender. You may optionally '. 'replace the [[ %s | default custom mail body ]] with different text '.