Skip to content

Commit

Permalink
Skip buffer if empty string is read
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Jul 16, 2015
1 parent ecab2c7 commit edc635f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stream/ReadableStreamTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private function fetch($resource)
if ($this->buffer->isEmpty()) {
$data = (string) fread($resource, $this->length);

if (null === $this->byte) {
if (null === $this->byte || '' === $data) {
return $data;
}

Expand Down

0 comments on commit edc635f

Please sign in to comment.