From efb49a6a098a196acfb497e489156da412c75bcc Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Thu, 5 Apr 2012 15:19:58 -0700 Subject: [PATCH] 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 --- .../owners/storage/owner/PhabricatorOwnersOwner.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/applications/owners/storage/owner/PhabricatorOwnersOwner.php b/src/applications/owners/storage/owner/PhabricatorOwnersOwner.php index 40cafebb3d..8d9a8663be 100644 --- a/src/applications/owners/storage/owner/PhabricatorOwnersOwner.php +++ b/src/applications/owners/storage/owner/PhabricatorOwnersOwner.php @@ -44,6 +44,9 @@ final class PhabricatorOwnersOwner extends PhabricatorOwnersDAO { // Loads all user phids affiliated with a set of packages. This includes both // user owners and all members of any project owners public static function loadAffiliatedUserPHIDs(array $package_ids) { + if (!$package_ids) { + return array(); + } $owners = id(new PhabricatorOwnersOwner())->loadAllWhere( 'packageID IN (%Ls)', $package_ids);