8000 [redis-messenger] remove undefined array key warnings · symfony/symfony@758539a · GitHub
[go: up one dir, main page]

Skip to content

Commit 758539a

Browse files
PhilETaylornicolas-grekas
authored andcommitted
[redis-messenger] remove undefined array key warnings
1 parent a57252f commit 758539a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,12 @@ public function get(): ?array
346346
$queuedMessageCount = $this->rawCommand('ZCOUNT', 0, $now);
347347

348348
while ($queuedMessageCount--) {
349-
if (![$queuedMessage, $expiry] = $this->rawCommand('ZPOPMIN', 1)) {
349+
if (!$message = $this->rawCommand('ZPOPMIN', 1)) {
350350
break;
351351
}
352352

353+
[$queuedMessage, $expiry] = $message;
354+
353355
if (\strlen($expiry) === \strlen($now) ? $expiry > $now : \strlen($expiry) < \strlen($now)) {
354356
// if a future-placed message is popped because of a race condition with
355357
// another running consumer, the message is readded to the queue

0 commit comments

Comments
 (0)
0