Explorar o código

Fixed bug reading zero-length values from a bulk response

Jordi Boggiano %!s(int64=14) %!d(string=hai) anos
pai
achega
c1587ccf54
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;