From e197fdb1dd041f17c2764bf1e7040e8389a1f13c Mon Sep 17 00:00:00 2001 From: alejo9424 Date: Fri, 28 Jan 2022 20:46:35 -0500 Subject: [PATCH] fix(Connector class): Solved validation in array position. --- src/Sqs/Connector.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Sqs/Connector.php b/src/Sqs/Connector.php index 9980d0b..70222cb 100644 --- a/src/Sqs/Connector.php +++ b/src/Sqs/Connector.php @@ -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; } -} +} \ No newline at end of file