mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Resolve deleted packages properly as having no mailable members
Summary: Fixes T13648. If a package recipient has been destroyed, this query currently fails to return an expanded recipient value. Instead, make sure all input PHIDs get an output. For destroyed packages, the output will just be an empty list. Test Plan: - Added a package to a revision as a reviewer. - Destroyed the package. - Commented on the revision. - Processed the publishing worker with `bin/worker execute`. - Before: fatal after expanding the destroyed package. - After: clean publish. Maniphest Tasks: T13648 Differential Revision: https://secure.phabricator.com/D21707
This commit is contained in:
parent
4cffaa600b
commit
387d3b4983
1 changed files with 10 additions and 0 deletions
|
@ -60,6 +60,16 @@ final class PhabricatorMetaMTAMemberQuery extends PhabricatorQuery {
|
|||
}
|
||||
$package_map[$package->getPHID()] = $package_owners;
|
||||
}
|
||||
|
||||
// See T13648. We may have packages that no longer exist or can't be
|
||||
// loaded (for example, because they have been destroyed). Give them
|
||||
// empty entries in the map so we return a mapping for all input PHIDs.
|
||||
|
||||
foreach ($package_phids as $package_phid) {
|
||||
if (!isset($package_map[$package_phid])) {
|
||||
$package_map[$package_phid] = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$results = array();
|
||||
|
|
Loading…
Reference in a new issue