Przeglądaj źródła

Remove a useless check for the payload length.

Daniele Alessandri 14 lat temu
rodzic
commit
2c761d6c95
1 zmienionych plików z 1 dodań i 4 usunięć
  1. 1 4
      lib/Predis.php

+ 1 - 4
lib/Predis.php

@@ -688,16 +688,13 @@ class ResponseReader {
         }
 
         $prefix  = $header[0];
-        $payload = strlen($header) > 1 ? substr($header, 1) : '';
-
         if (!isset($this->_prefixHandlers[$prefix])) {
             Shared\Utils::onCommunicationException(new MalformedServerResponse(
                 $connection, "Unknown prefix '$prefix'"
             ));
         }
-
         $handler = $this->_prefixHandlers[$prefix];
-        return $handler->handle($connection, $payload);
+        return $handler->handle($connection, substr($header, 1));
     }
 }