Skip to content

Commit

Permalink
fix: issue #64 - undefined array key 'routingKeys' (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomPavelec committed Jul 21, 2023
1 parent c44d1eb commit 4f60fd2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Exchange/ExchangeDeclarator.php
Expand Up @@ -52,10 +52,14 @@ public function declareExchange(string $name): void
if ($exchangeData['queueBindings'] !== []) {
foreach ($exchangeData['queueBindings'] as $queueName => $queueBinding) {
$queue = $this->queueFactory->getQueue($queueName);

if ($queueBinding['routingKeys'] !== []) {

$routingKeysToBind = [];

if (isset($queueBinding['routingKeys'])
&& $queueBinding['routingKeys'] !== []
) {
$routingKeysToBind = $queueBinding['routingKeys'];
} else {
} elseif (isset($queueBinding['routingKey'])) {
$routingKeysToBind = [$queueBinding['routingKey']];
}

Expand Down

0 comments on commit 4f60fd2

Please sign in to comment.