Ver Fonte

Fix wrong method signature.

Daniele Alessandri há 14 anos atrás
pai
commit
dcafee61a8
1 ficheiros alterados com 3 adições e 3 exclusões
  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
         ));