Ver código fonte

Fixed bug reading zero-length values from a bulk response

Jordi Boggiano 14 anos atrás
pai
commit
c1587ccf54
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -1832,7 +1832,7 @@ class ResponseBulkHandler implements IResponseHandler {
             ));
         }
         if ($length >= 0) {
-          return $length > 0 ? substr($connection->readBytes($length + 2), 0, -2) : '';
+            return substr($connection->readBytes($length + 2), 0, -2);
         }
         if ($length == -1) {
             return null;