Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit f25844e

Browse files
committed
Added exception for check authorization
1 parent 301b476 commit f25844e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ZendDiagnostics/Check/Redis.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function check()
5656
/**
5757
* @return PredisClient|RedisExtensionClient
5858
*
59+
* @throws \RedisException
5960
* @throws \RuntimeException
6061
*/
6162
private function createClient()
@@ -64,8 +65,8 @@ private function createClient()
6465
$client = new RedisExtensionClient();
6566
$client->connect($this->host, $this->port);
6667

67-
if ($this->auth) {
68-
$client->auth($this->auth);
68+
if ($this->auth && false === $client->auth($this->auth)) {
69+
throw new \RedisException('Failed to AUTH connection');
6970
}
7071

7172
return $client;

0 commit comments

Comments
 (0)