Fix redis connection error message

Use correct instance of redis to getLastError
This commit is contained in:
Alexander Schranz 2020-09-30 17:56:30 +02:00 committed by Nicolas Grekas
parent c4015edcfb
commit f4e42ad3d4

View File

@ -61,11 +61,11 @@ class Connection
}
if (null !== $auth && !$this->connection->auth($auth)) {
throw new InvalidArgumentException('Redis connection failed: '.$redis->getLastError());
throw new InvalidArgumentException('Redis connection failed: '.$this->connection->getLastError());
}
if (($dbIndex = $configuration['dbindex'] ?? self::DEFAULT_OPTIONS['dbindex']) && !$this->connection->select($dbIndex)) {
throw new InvalidArgumentException('Redis connection failed: '.$redis->getLastError());
throw new InvalidArgumentException('Redis connection failed: '.$this->connection->getLastError());
}
foreach (['stream', 'group', 'consumer'] as $key) {