Skip to content

Commit d6c2164

Browse files
committed
Fix get contents not complete
1 parent 79a5a57 commit d6c2164

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Stream.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ public function getContents()
192192
return stream_get_contents($this->socket);
193193
}
194194

195-
return $this->read($this->getSize() - $this->readed);
195+
$contents = "";
196+
197+
do {
198+
$contents .= $this->read($this->getSize() - $this->readed);
199+
} while ($this->readed < $this->getSize());
200+
201+
return $contents;
196202
}
197203

198204
/**

0 commit comments

Comments
 (0)