Skip to content
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

Merged
merged 1 commit into from
Jan 28, 2017
Merged

Fix PhpRedis issues #17627

merged 1 commit into from
Jan 28, 2017

Conversation

tillkruss
Copy link
Contributor

@tillkruss tillkruss commented Jan 28, 2017

Fixes #17623. See code comments for details.

@@ -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]);
Copy link
Contributor Author

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);
Copy link
Contributor Author

@tillkruss tillkruss Jan 28, 2017

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
]);
Copy link
Contributor Author

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);
}

Copy link
Contributor Author

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.

@taylorotwell taylorotwell merged commit ddcf575 into laravel:5.4 Jan 28, 2017
@tillkruss tillkruss deleted the phpredis-fixes branch April 16, 2017 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants