Fix differential.createrevision conduit call
Summary: This introduces some boundary checking for PhabricatorOwnersOwner::loadAffiliatedUserPHIDs() if it gets passed an empty array, which happened when I ran arc diff and it called differential.createrevision. Test Plan: ran arc diff Reviewers: epriestley, meitros, jungejason CC: aran Differential Revision: https://secure.phabricator.com/D2112
This commit is contained in:
@@ -44,6 +44,9 @@ final class PhabricatorOwnersOwner extends PhabricatorOwnersDAO {
|
|||||||
// Loads all user phids affiliated with a set of packages. This includes both
|
// Loads all user phids affiliated with a set of packages. This includes both
|
||||||
// user owners and all members of any project owners
|
// user owners and all members of any project owners
|
||||||
public static function loadAffiliatedUserPHIDs(array $package_ids) {
|
public static function loadAffiliatedUserPHIDs(array $package_ids) {
|
||||||
|
if (!$package_ids) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
$owners = id(new PhabricatorOwnersOwner())->loadAllWhere(
|
$owners = id(new PhabricatorOwnersOwner())->loadAllWhere(
|
||||||
'packageID IN (%Ls)',
|
'packageID IN (%Ls)',
|
||||||
$package_ids);
|
$package_ids);
|
||||||
|
|||||||
Reference in New Issue
Block a user