diff --git a/src/services/Plans.php b/src/services/Plans.php index 31611c5dad..e5316e315d 100644 --- a/src/services/Plans.php +++ b/src/services/Plans.php @@ -380,10 +380,10 @@ private function _populatePlan(array $result): Plan private function _getAllPlans(): array { if ($this->_allPlans === null) { + $this->_allPlans = []; $plans = $this->_createPlansQuery()->all(); if (!empty($plans)) { - $this->_allPlans = []; $plans = $this->_populatePlans($plans); foreach ($plans as $plan) { $this->_allPlans[$plan->id] = $plan;