Skip to content

Commit c1cab89

Browse files
andrey-legayevcolinmollenhour
authored andcommitted
Credis_Cluster - Fix hashing mechanism for array arguments (#111)
1 parent 215d287 commit c1cab89

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Cluster.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,11 @@ public function __call($name, $args)
240240
$client = $this->clients[0];
241241
}
242242
else {
243-
$client = $this->byHash($args[0]);
243+
$hashKey = $args[0];
244+
if (is_array($hashKey)) {
245+
$hashKey = join('|', $hashKey);
246+
}
247+
$client = $this->byHash($hashKey);
244248
}
245249
// Ensure that current client is working on the same database as expected.
246250
if ($client->getSelectedDb() != $this->selectedDb) {

0 commit comments

Comments
 (0)