Skip to content

Commit f0ab69d

Browse files
authored
Fixed bug that Redis::scan does not work when using redis cluster. (#4399)
1 parent 8f49d39 commit f0ab69d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/ScanCaller.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313

1414
trait ScanCaller
1515
{
16-
public function scan(&$cursor, $pattern = null, $count = 0)
16+
public function scan(&$cursor, ...$arguments)
1717
{
18-
return $this->__call('scan', [&$cursor, $pattern, $count]);
18+
return $this->__call('scan', array_merge([&$cursor], $arguments));
1919
}
2020

21-
public function hScan($key, &$cursor, $pattern = null, $count = 0)
21+
public function hScan($key, &$cursor, ...$arguments)
2222
{
23-
return $this->__call('hScan', [$key, &$cursor, $pattern, $count]);
23+
return $this->__call('hScan', array_merge([$key, &$cursor], $arguments));
2424
}
2525

26-
public function zScan($key, &$cursor, $pattern = null, $count = 0)
26+
public function zScan($key, &$cursor, ...$arguments)
2727
{
28-
return $this->__call('zScan', [$key, &$cursor, $pattern, $count]);
28+
return $this->__call('zScan', array_merge([$key, &$cursor], $arguments));
2929
}
3030

31-
public function sScan($key, &$cursor, $pattern = null, $count = 0)
31+
public function sScan($key, &$cursor, ...$arguments)
3232
{
33-
return $this->__call('sScan', [$key, &$cursor, $pattern, $count]);
33+
return $this->__call('sScan', array_merge([$key, &$cursor], $arguments));
3434
}
3535
}

0 commit comments

Comments
 (0)