소스 검색

Bugfix: the response parser for KEYS raises a E_WARNING when using iterators for multi bulk responses against Redis v2.0.

Daniele Alessandri 15 년 전
부모
커밋
ce00cb14b9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -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();