Эх сурвалжийг харах

Remove a useless check for the payload length.

Daniele Alessandri 14 жил өмнө
parent
commit
2c761d6c95
1 өөрчлөгдсөн 1 нэмэгдсэн , 4 устгасан
  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));
     }
 }