Skip to content

Commit 4c7b7cd

Browse files
committed
Update PredisCluster.php
1 parent 0c536e5 commit 4c7b7cd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Dashboards/Redis/Compatibility/Cluster/PredisCluster.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function streamAdd(string $key, string $id, array $messages): string {
243243
}
244244

245245
$node = $this->getKeyNode($key);
246-
if (!$node) {
246+
if (!$node instanceof PredisClient) {
247247
return '';
248248
}
249249

@@ -263,7 +263,7 @@ public function xrange(string $key, string $start, string $end, ?int $count = nu
263263
}
264264

265265
$node = $this->getKeyNode($key);
266-
if (!$node) {
266+
if (!$node instanceof PredisClient) {
267267
return [];
268268
}
269269

@@ -288,6 +288,7 @@ private function parseStreamEntries(array $entries): array {
288288
for ($i = 0, $iMax = count($fields); $i < $iMax; $i += 2) {
289289
$assoc[$fields[$i]] = $fields[$i + 1];
290290
}
291+
291292
$result[$id] = $assoc;
292293
}
293294

@@ -303,7 +304,7 @@ public function xdel(string $key, string|array ...$id): int {
303304
}
304305

305306
$node = $this->getKeyNode($key);
306-
if (!$node) {
307+
if (!$node instanceof PredisClient) {
307308
return 0;
308309
}
309310

0 commit comments

Comments
 (0)