diff --git a/src/Command/CommandBase.php b/src/Command/CommandBase.php index 09ef0e790..e4c2655d8 100644 --- a/src/Command/CommandBase.php +++ b/src/Command/CommandBase.php @@ -1436,6 +1436,10 @@ protected function promptChooseAcsfSite(EnvironmentResponse $cloudEnvironment): foreach ($acsfSites['sites'] as $domain => $acsfSite) { $choices[] = "{$acsfSite['name']} ($domain)"; } + if (!count($choices)) { + throw new AcquiaCliException("Could not get ACSF sites"); + } + $choice = $this->io->choice('Choose a site', $choices, $choices[0]); $key = array_search($choice, $choices, true); $sites = array_values($acsfSites['sites']);