瀏覽代碼

Fixed bug reading zero-length values from a bulk response

Jordi Boggiano 14 年之前
父節點
當前提交
c1587ccf54
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;