소스 검색

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

Daniele Alessandri 14 년 전
부모
커밋
2b809325e0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;