diff --git a/lib/Horde/Stream/Wrapper/Combine.php b/lib/Horde/Stream/Wrapper/Combine.php index 80b723df..d7a4a751 100644 --- a/lib/Horde/Stream/Wrapper/Combine.php +++ b/lib/Horde/Stream/Wrapper/Combine.php @@ -171,9 +171,11 @@ public function stream_read($count) } $curr_read = min($count, $tmp['l'] - $tmp['p']); - $out .= fread($tmp['fp'], $curr_read); - $count -= $curr_read; - $this->_position += $curr_read; + if ($curr_read > 0) { + $out .= fread($tmp['fp'], $curr_read); + $count -= $curr_read; + $this->_position += $curr_read; + } if ($this->_position == $this->_length) { if ($count) {