Skip to content

Commit

Permalink
Fix zRangeByScore syntax for PhpRedis (#17912)
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss authored and taylorotwell committed Feb 13, 2017
1 parent 1c868e1 commit 2095064
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Illuminate/Redis/Connections/PhpRedisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,18 @@ public function disconnect()
*/
public function __call($method, $parameters)
{
$method = strtolower($method);

if ($method == 'eval') {
return $this->proxyToEval($parameters);
}

if ($method == 'zrangebyscore' || $method == 'zrevrangebyscore') {
$parameters = array_map(function ($parameter) {
return is_array($parameter) ? array_change_key_case($parameter) : $parameter;
}, $parameters);
}

return parent::__call($method, $parameters);
}
}

0 comments on commit 2095064

Please sign in to comment.