Skip to content
Permalink
Browse files

check version

  • Loading branch information...
taylorotwell committed May 13, 2019
1 parent b235013 commit 1371940abe17b7b6008e136060fcf5534f15f03f
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/Illuminate/Redis/Connectors/PhpRedisConnector.php
@@ -118,13 +118,23 @@ protected function establishConnection($client, array $config)
*/
protected function createRedisClusterInstance(array $servers, array $options)
{
if (version_compare(phpversion('redis'), '4.3.0', '>=')) {
return new RedisCluster(
null,
array_values($servers),
$options['timeout'] ?? 0,
$options['read_timeout'] ?? 0,
isset($options['persistent']) && $options['persistent'],
$options['password'] ?? null
);
}
return new RedisCluster(
null,
array_values($servers),
$options['timeout'] ?? 0,
$options['read_timeout'] ?? 0,
isset($options['persistent']) && $options['persistent'],
$options['password'] ?? null
isset($options['persistent']) && $options['persistent']
);
}
}

0 comments on commit 1371940

Please sign in to comment.
You can’t perform that action at this time.