瀏覽代碼

Fix wrong method signature.

Daniele Alessandri 14 年之前
父節點
當前提交
dcafee61a8
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      lib/Predis.php

+ 3 - 3
lib/Predis.php

@@ -1781,18 +1781,18 @@ class TextResponseReader implements IResponseReader {
     public function read(IConnectionSingle $connection) {
         $header = $connection->readLine();
         if ($header === '') {
-            $this->throwMalformedResponse('Unexpected empty header');
+            $this->throwMalformedResponse($connection, 'Unexpected empty header');
         }
 
         $prefix = $header[0];
         if (!isset($this->_prefixHandlers[$prefix])) {
-            $this->throwMalformedResponse("Unknown prefix '$prefix'");
+            $this->throwMalformedResponse($connection, "Unknown prefix '$prefix'");
         }
         $handler = $this->_prefixHandlers[$prefix];
         return $handler->handle($connection, substr($header, 1));
     }
 
-    private function throwMalformedResponse($message) {
+    private function throwMalformedResponse(IConnectionSingle $connection, $message) {
         Utils::onCommunicationException(new MalformedServerResponse(
             $connection, $message
         ));