[Cache] Fix password used to make the redis connection.

This commit is contained in:
Erik Saunier 2016-09-23 15:37:10 +02:00
parent b23389d85d
commit 77eea43ee1

View File

@ -69,7 +69,7 @@ class RedisAdapter extends AbstractAdapter
if (0 !== strpos($dsn, 'redis://')) {
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with "redis://"', $dsn));
}
$params = preg_replace_callback('#^redis://(?:([^@]*)@)?#', function ($m) use (&$auth) {
$params = preg_replace_callback('#^redis://(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) {
if (isset($m[1])) {
$auth = $m[1];
}