Merge pull request #38568 from rawtaz/fix-redis-empty-password

redis: Do not try to authenticate with non-string password/user
This commit is contained in:
Robin Appelman 2023-06-01 22:11:55 +02:00 committed by GitHub
commit e81fdfefab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,8 +72,8 @@ class RedisFactory {
}
$auth = null;
if (isset($config['password']) && $config['password'] !== '') {
if (isset($config['user']) && $config['user'] !== '') {
if (isset($config['password']) && (string)$config['password'] !== '') {
if (isset($config['user']) && (string)$config['user'] !== '') {
$auth = [$config['user'], $config['password']];
} else {
$auth = $config['password'];