1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

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
This commit is contained in:
epriestley 2019-01-20 06:56:23 -08:00
parent 755c40221d
commit be8b7c9eba

View file

@ -51,7 +51,7 @@ final class PhabricatorPeopleWelcomeController
$default_message = PhabricatorAuthMessage::loadMessage( $default_message = PhabricatorAuthMessage::loadMessage(
$admin, $admin,
PhabricatorAuthWelcomeMailMessageType::MESSAGEKEY); PhabricatorAuthWelcomeMailMessageType::MESSAGEKEY);
if (strlen($default_message->getMessageText())) { if ($default_message && strlen($default_message->getMessageText())) {
$message_instructions = pht( $message_instructions = pht(
'The email will identify you as the sender. You may optionally '. 'The email will identify you as the sender. You may optionally '.
'replace the [[ %s | default custom mail body ]] with different text '. 'replace the [[ %s | default custom mail body ]] with different text '.