Skip to content

Commit

Permalink
update scan to use reference (iterator)
Browse files Browse the repository at this point in the history
Solves issue `Warning: Parameter 1 to Redis::scan() expected to be a reference, value given` in snc#178
  • Loading branch information
toooni authored Jan 18, 2017
1 parent 101b7f8 commit 5977365
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Client/Phpredis/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ public function sGetMembers()
*/
public function sScan($key, &$iterator, $pattern = null, $count = null)
{
return $this->call('sScan', array($key, $iterator, $pattern, $count));
return $this->call('sScan', array($key, &$iterator, $pattern, $count));
}

/**
Expand Down Expand Up @@ -1136,7 +1136,7 @@ public function zInter()
*/
public function zScan($key, &$iterator, $pattern = null, $count = null)
{
return $this->call('zScan', array($key, $iterator, $pattern, $count));
return $this->call('zScan', array($key, &$iterator, $pattern, $count));
}

/**
Expand Down Expand Up @@ -1248,7 +1248,7 @@ public function hMGet()
*/
public function hScan($key, &$iterator, $pattern = null, $count = null)
{
return $this->call('hScan', array($key, $iterator, $pattern, $count));
return $this->call('hScan', array($key, &$iterator, $pattern, $count));
}

/**
Expand Down Expand Up @@ -1344,7 +1344,7 @@ public function time()
*/
public function scan(&$iterator, $pattern = null, $count = null)
{
return $this->call('scan', array($iterator, $pattern, $count));
return $this->call('scan', array(&$iterator, $pattern, $count));
}

/**
Expand Down

0 comments on commit 5977365

Please sign in to comment.