Explorar o código

Bugfix: return an empty string instead of null when the data length of a bulk reply is 0.

Daniele Alessandri %!s(int64=15) %!d(string=hai) anos
pai
achega
55c40afcd8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -312,8 +312,8 @@ class Response {
                     return $value;
                 }
                 else if ($dataLength == 0) {
-                    // TODO: I just have a doubt here...
                     fread($socket, 2);
+                    return '';
                 }
 
                 return null;