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

Don't try to emit project board update events if there are no projects to update

Summary: Ref T4900. We may execute a bad query here if the task has no projects at all.

Test Plan: Edited a task with no new or old projects. Instead of an exception, things worked.

Maniphest Tasks: T4900

Differential Revision: https://secure.phabricator.com/D20689
This commit is contained in:
epriestley 2019-07-31 12:40:53 -07:00
parent 47d497aa60
commit 76cd181bf3

View file

@ -879,6 +879,7 @@ final class ManiphestTransactionEditor
$project_phids = array_fuse($old_phids) + array_fuse($new_phids); $project_phids = array_fuse($old_phids) + array_fuse($new_phids);
$project_phids = array_keys($project_phids); $project_phids = array_keys($project_phids);
if ($project_phids) {
$projects = id(new PhabricatorProjectQuery()) $projects = id(new PhabricatorProjectQuery())
->setViewer(PhabricatorUser::getOmnipotentUser()) ->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs($project_phids) ->withPHIDs($project_phids)
@ -909,6 +910,7 @@ final class ManiphestTransactionEditor
PhabricatorNotificationClient::tryToPostMessage($data); PhabricatorNotificationClient::tryToPostMessage($data);
} }
} }
}
return $xactions; return $xactions;
} }