Skip to content

Commit

Permalink
Ignore empty redis username string in PhpRedisConnector (#41773)
Browse files Browse the repository at this point in the history
* Ignore empty redis username string

* Revert code format change
  • Loading branch information
seanmtaylor authored Apr 1, 2022
1 parent d4da662 commit 1d82ec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Redis/Connectors/PhpRedisConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function createClient(array $config)
$this->establishConnection($client, $config);

if (! empty($config['password'])) {
if (isset($config['username']) && is_string($config['password'])) {
if (isset($config['username']) && $config['username'] !== '' && is_string($config['password'])) {
$client->auth([$config['username'], $config['password']]);
} else {
$client->auth($config['password']);
Expand Down

0 comments on commit 1d82ec6

Please sign in to comment.