diff --git a/lib/Predis.php b/lib/Predis.php index e3c47365..8ef0dc61 100644 --- a/lib/Predis.php +++ b/lib/Predis.php @@ -1449,7 +1449,7 @@ class TcpConnection extends Connection implements IConnectionSingle { $value = ''; do { $chunk = fgets($socket); - if ($chunk === false || strlen($chunk) == 0) { + if ($chunk === false || $chunk === '') { $this->onCommunicationException('Error while reading line from the server'); } $value .= $chunk;