diff --git a/src/applications/phortune/query/PhortuneSubscriptionQuery.php b/src/applications/phortune/query/PhortuneSubscriptionQuery.php index b789030dca..ba6d7acc73 100644 --- a/src/applications/phortune/query/PhortuneSubscriptionQuery.php +++ b/src/applications/phortune/query/PhortuneSubscriptionQuery.php @@ -72,6 +72,10 @@ final class PhortuneSubscriptionQuery $subscription->attachAccount($account); } + if (!$subscriptions) { + return $subscriptions; + } + $merchants = id(new PhortuneMerchantQuery()) ->setViewer($this->getViewer()) ->withPHIDs(mpull($subscriptions, 'getMerchantPHID')) @@ -87,6 +91,10 @@ final class PhortuneSubscriptionQuery $subscription->attachMerchant($merchant); } + if (!$subscriptions) { + return $subscriptions; + } + $implementations = array(); $subscription_map = mgroup($subscriptions, 'getSubscriptionClass'); @@ -109,6 +117,10 @@ final class PhortuneSubscriptionQuery $subscription->attachImplementation($implementation); } + if (!$subscriptions) { + return $subscriptions; + } + if ($this->needTriggers) { $trigger_phids = mpull($subscriptions, 'getTriggerPHID'); $triggers = id(new PhabricatorWorkerTriggerQuery())