-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PhpRedis issues #17627
Fix PhpRedis issues #17627
Conversation
@@ -59,7 +58,7 @@ public function lrem($key, $count, $value) | |||
*/ | |||
public function spop($key, $count = null) | |||
{ | |||
return $this->command('spop', $key, $count); | |||
return $this->command('spop', [$key]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PhpRedis doesn't support the $count
parameter.
$arguments[] = $score; | ||
$arguments[] = $member; | ||
} | ||
|
||
return $this->command('zadd', ...$arguments); | ||
return $this->client->zadd($key, ...$arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added missing $key
parameter and inverted $score
and $member
.
return $this->command('evalsha', [$this->script('load', $script), $arguments, $parameters]); | ||
return $this->command('evalsha', [ | ||
$this->script('load', $script), $arguments, $numkeys | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced $parameter
with $numkeys
.
if (is_array($parameters) && in_array($method, $arrayMethods)) { | ||
$this->command($method, ...$parameters); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->command()
unpacks arguments already. Not necessary.
Fixes #17623. See code comments for details.