diff --git a/lib/Redisent/Redisent.php b/lib/Redisent/Redisent.php index 0b9ea6e..7c7f33b 100644 --- a/lib/Redisent/Redisent.php +++ b/lib/Redisent/Redisent.php @@ -83,15 +83,15 @@ class Redisent { break; /* Bulk reply */ case '$': + $response = null; if ($reply == '$-1') { - $response = null; break; } $read = 0; $size = substr($reply, 1); do { $block_size = ($size - $read) > 1024 ? 1024 : ($size - $read); - $response = fread($this->__sock, $block_size); + $response .= fread($this->__sock, $block_size); $read += $block_size; } while ($read < $size); fread($this->__sock, 2); /* discard crlf */