Skip to content

Commit 8e27944

Browse files
committed
Try to fix occasional non-array returned result in RedisRoom.
1 parent d7e47aa commit 8e27944

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Websocket/Rooms/RedisRoom.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@ public function getValue(string $key, string $table)
219219
{
220220
$this->checkTable($table);
221221

222-
return $this->redis->smembers($this->getKey($key, $table));
222+
$result = $this->redis->smembers($this->getKey($key, $table));
223+
224+
// Try to fix occasional non-array returned result
225+
return is_array($result) ? $result : [];
223226
}
224227

225228
/**

0 commit comments

Comments
 (0)