From 13c0c3b850ea9b34bc13f481e076968a5c8196b1 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 8 Apr 2015 05:22:16 -0700 Subject: [PATCH] Fix "To: Unknown Object" on outbound Maniphest mail with no owner Summary: Fixes T7778. This was likely caused by removing an `array_filter()` somewhere in the course of T7731, but I'd rather have the code be more correct. Test Plan: Sent mail on a task with no owner. - Before patch: unknown recipient. - After patch: expected recipients. Reviewers: btrahan, joshuaspence Reviewed By: joshuaspence Subscribers: epriestley Maniphest Tasks: T7778 Differential Revision: https://secure.phabricator.com/D12320 --- .../maniphest/editor/ManiphestTransactionEditor.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php index 860faaa147..432bbdb291 100644 --- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php +++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php @@ -386,10 +386,14 @@ final class ManiphestTransactionEditor } protected function getMailTo(PhabricatorLiskDAO $object) { - return array( - $object->getOwnerPHID(), - $this->getActingAsPHID(), - ); + $phids = array(); + + if ($object->getOwnerPHID()) { + $phids[] = $object->getOwnerPHID(); + } + $phids[] = $this->getActingAsPHID(); + + return $phids; } public function getMailTagsMap() {