-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
$keys = $this->datastoreCloud->get('keys'); | ||
$activeKey = $this->datastoreCloud->get('acli_key'); | ||
// @todo this validation should really be enforced as a schema on the datastore. | ||
if (count($keys) != 0 && !array_key_exists($activeKey, $keys)) { | ||
if ( is_array($keys) && !empty($keys) != 0 && !array_key_exists($activeKey, $keys)) { | ||
Check warning on line 30 in src/Command/Auth/AuthLoginCommand.php GitHub Actions / Mutation Testing
|
||
throw new AcquiaCliException('Invalid key in Cloud datastore; run acli auth:logout && acli auth:login to fix'); | ||
} | ||
if ($activeKey) { | ||
|