Skip to content

Commit

Permalink
Merge pull request #51 from 4l3j4ndr0/hotfix/undefinedIndexKey
Browse files Browse the repository at this point in the history
fix(Connector class): Solved validation in array position.
  • Loading branch information
dusterio authored Feb 1, 2022
2 parents ad0bee2 + e197fdb commit 2401ba5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Sqs/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ public function connect(array $config)
{
$config = $this->getDefaultConfiguration($config);

if ($config['key'] && $config['secret']) {
if (isset($config['key']) && isset($config['secret'])) {
$config['credentials'] = Arr::only($config, ['key', 'secret']);
}

$queue = new Queue(
new SqsClient($config), $config['queue'], Arr::get($config, 'prefix', '')
new SqsClient($config),
$config['queue'],
Arr::get($config, 'prefix', '')
);

return $queue;
}
}
}

0 comments on commit 2401ba5

Please sign in to comment.