Predis\Commands\Keys has been adjusted to handle the change in its reply type in a backwards-compatible way (the KEYS command will return a multibulk reply starting from Redis 2.0).

This commit is contained in:
Daniele Alessandri
2010-03-02 16:47:18 +01:00
parent c8554f2c8b
commit e114f86d64
+3
View File
@@ -1257,6 +1257,9 @@ class Keys extends \Predis\InlineCommand {
public function getCommandId() { return 'KEYS'; }
public function parseResponse($data) {
// TODO: is this behaviour correct?
if (is_array($data)) {
return $data;
}
return strlen($data) > 0 ? explode(' ', $data) : array();
}
}