Explorar el Código

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

Daniele Alessandri hace 14 años
padre
commit
4b1302a93a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -1407,7 +1407,7 @@ class Connection implements IConnection {
         $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;