Skip to content

Commit

Permalink
Update Client.php
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor authored Jun 8, 2023
1 parent 284f93c commit 542f10c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,10 @@ protected function keyMapCb($command, $key, array $array, $cb)
public function __call($method, $args)
{
$cb = null;
if (\is_callable(end($args))) {
$cb = array_pop($args);
if (count($args) > 1 || in_array($method, ['randomKey', 'multi', 'exec', 'discard'])) {
if (\is_callable(end($args))) {
$cb = array_pop($args);
}
}

\array_unshift($args, \strtoupper($method));
Expand Down

0 comments on commit 542f10c

Please sign in to comment.