aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/lukasreschke/id3parser/src
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/lukasreschke/id3parser/src
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/lukasreschke/id3parser/src')
-rw-r--r--vendor/lukasreschke/id3parser/src/getID3/getid3_handler.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/vendor/lukasreschke/id3parser/src/getID3/getid3_handler.php b/vendor/lukasreschke/id3parser/src/getID3/getid3_handler.php
index 654593349..f1f43f6ba 100644
--- a/vendor/lukasreschke/id3parser/src/getID3/getid3_handler.php
+++ b/vendor/lukasreschke/id3parser/src/getID3/getid3_handler.php
@@ -84,7 +84,17 @@ abstract class getid3_handler {
if (!getid3_lib::intValueSupported($pos)) {
throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') because beyond PHP filesystem limit', 10);
}
- return fread($this->getid3->fp, $bytes);
+
+ // System fread function may return less data than requested in case the file is not a regular local file.
+ // See http://php.net/manual/en/function.fread.php. Call it repeatedly in a loop if that is the case.
+ $contents = '';
+ do {
+ $part = fread($this->getid3->fp, $bytes);
+ $partLength = strlen($part);
+ $bytes -= $partLength;
+ $contents .= $part;
+ } while ($bytes > 0 && $partLength > 0);
+ return $contents;
}
protected function fseek($bytes, $whence=SEEK_SET) {