Преглед на файлове

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

Daniele Alessandri преди 14 години
родител
ревизия
4b1302a93a
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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;