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

This commit is contained in:
Daniele Alessandri
2011-01-02 22:05:27 +01:00
parent 2c761d6c95
commit 7465daa0eb
+1 -1
View File
@@ -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();