소스 검색

More strict check of the length argument for a network read.

Daniele Alessandri 14 년 전
부모
커밋
7465daa0eb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -1380,7 +1380,7 @@ class Connection implements IConnection {
     }
 
     public function readBytes($length) {
-        if ($length == 0) {
+        if ($length <= 0) {
             throw new \InvalidArgumentException('Length parameter must be greater than 0');
         }
         $socket = $this->getSocket();