mirror of
https://github.com/predis/predis.git
synced 2026-09-04 23:08:00 +00:00
Removed a wrong type-check in Predis\Client::setupConnection that was breaking the initialization of a cluster of connections when using an array of URI strings as parameters.
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ class Client {
|
|||||||
throw new ClientException('Invalid parameters type (array or string expected)');
|
throw new ClientException('Invalid parameters type (array or string expected)');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($parameters) && isset($parameters[0]) && is_array($parameters[0])) {
|
if (is_array($parameters) && isset($parameters[0])) {
|
||||||
$cluster = new ConnectionCluster();
|
$cluster = new ConnectionCluster();
|
||||||
foreach ($parameters as $shardParams) {
|
foreach ($parameters as $shardParams) {
|
||||||
$cluster->add($this->createConnection($shardParams));
|
$cluster->add($this->createConnection($shardParams));
|
||||||
|
|||||||
Reference in New Issue
Block a user