Browse Source

Do not parse ResponseError instances.

Daniele Alessandri 15 years ago
parent
commit
1fe49863b4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/Predis.php

+ 2 - 1
lib/Predis.php

@@ -825,7 +825,8 @@ class Connection implements IConnection {
 
     public function readResponse(Command $command) {
         $response = $this->_reader->read($this);
-        return isset($response->queued) ? $response : $command->parseResponse($response);
+        $skipparse = isset($response->queued) || isset($response->error);
+        return $skipparse ? $response : $command->parseResponse($response);
     }
 
     public function rawCommand($rawCommandData, $closesConnection = false) {