mirror of
https://github.com/predis/predis.git
synced 2026-10-25 13:17:41 +00:00
Bugfix: the response parser for KEYS raises a E_WARNING when using iterators for multi bulk responses against Redis v2.0.
This commit is contained in:
+1
-1
@@ -1497,7 +1497,7 @@ class Keys extends \Predis\InlineCommand {
|
||||
public function getCommandId() { return 'KEYS'; }
|
||||
public function parseResponse($data) {
|
||||
// TODO: is this behaviour correct?
|
||||
if (is_array($data)) {
|
||||
if (is_array($data) || $data instanceof \Iterator) {
|
||||
return $data;
|
||||
}
|
||||
return strlen($data) > 0 ? explode(' ', $data) : array();
|
||||
|
||||
Reference in New Issue
Block a user