diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-07-07 14:37:58 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-07-07 14:37:58 +0000 |
| commit | c5580572a15003e3c2fb1d9cbd7c2baafe14bb5a (patch) | |
| tree | 0d476e736e7ff30fa920c6ce32919f41c0a27bf7 /wp-includes/streams.php | |
| parent | d3ab0af45aaa6a0135b497df0d7657635de900ab (diff) | |
| download | wordpress-mu-c5580572a15003e3c2fb1d9cbd7c2baafe14bb5a.tar.gz wordpress-mu-c5580572a15003e3c2fb1d9cbd7c2baafe14bb5a.tar.xz wordpress-mu-c5580572a15003e3c2fb1d9cbd7c2baafe14bb5a.zip | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@643 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/streams.php')
| -rw-r--r-- | wp-includes/streams.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/wp-includes/streams.php b/wp-includes/streams.php index c69841e..8cf1c48 100644 --- a/wp-includes/streams.php +++ b/wp-includes/streams.php @@ -105,7 +105,14 @@ class FileReader { function read($bytes) { if ($bytes) { fseek($this->_fd, $this->_pos); - $data = fread($this->_fd, $bytes); + + // PHP 5.1.1 does not read more than 8192 bytes in one fread() + // the discussions at PHP Bugs suggest it's the intended behaviour + while ($bytes > 0) { + $chunk = fread($this->_fd, $bytes); + $data .= $chunk; + $bytes -= strlen($chunk); + } $this->_pos = ftell($this->_fd); return $data; @@ -156,4 +163,4 @@ class CachedFileReader extends StringReader { } -?>
\ No newline at end of file +?> |
