Forráskód Böngészése

Use a faster method to detect errors when reading a line from the server.

Daniele Alessandri 14 éve
szülő
commit
2b809325e0
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      lib/Predis.php

+ 1 - 1
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;