Skip to content

Commit 6c1a725

Browse files
authored
fix(kv-store): allow Predis connection errors to be caught (#1930)
1 parent 5bb84c1 commit 6c1a725

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/kv-store/src/Redis/PredisClient.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ public function connect(): void
2323
return;
2424
}
2525

26-
$this->client->connect();
26+
set_error_handler(static fn () => true);
27+
28+
try {
29+
$this->client->connect();
30+
} finally {
31+
restore_error_handler();
32+
}
2733
}
2834

2935
public function disconnect(): void

0 commit comments

Comments
 (0)