Skip to content

Commit

Permalink
Credis_Cluster - Fix hashing mechanism for array arguments (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-legayev authored and colinmollenhour committed Mar 5, 2019
1 parent 215d287 commit c1cab89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Cluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ public function __call($name, $args)
$client = $this->clients[0];
}
else {
$client = $this->byHash($args[0]);
$hashKey = $args[0];
if (is_array($hashKey)) {
$hashKey = join('|', $hashKey);
}
$client = $this->byHash($hashKey);
}
// Ensure that current client is working on the same database as expected.
if ($client->getSelectedDb() != $this->selectedDb) {
Expand Down

0 comments on commit c1cab89

Please sign in to comment.