1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 13:52:40 +01:00

Fix fatal when deleted user is subscribed to a task and we generate an email to them

Summary: Fixes T3528. We won't be able to load the user if they've been deleted, and will fatal a few lines later on `$user->getID()`.

Test Plan: I'm going with my gut on this one.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3528

Differential Revision: https://secure.phabricator.com/D6442
This commit is contained in:
epriestley 2013-07-13 10:41:17 -07:00
parent e4725832c4
commit 0acdab7fc6

View file

@ -290,6 +290,12 @@ EOBODY;
->withPHIDs(array($handle->getPHID()))
->executeOne();
if (!$user) {
// This may happen if a user was subscribed to something, and was then
// deleted.
return null;
}
$receiver = $this->getMailReceiver();
$receiver_id = $receiver->getID();
$user_id = $user->getID();