mirror of
https://codeberg.org/icewind/streams.git
synced 2026-06-03 16:44:07 +02:00
Fix read in callbackwrapper
The number of read bytes is not the same as the number of bytes requested to read. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
0a78597117
commit
0bc7fe4cb1
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ class CallbackWrapper extends Wrapper {
|
||||||
public function stream_read($count) {
|
public function stream_read($count) {
|
||||||
$result = parent::stream_read($count);
|
$result = parent::stream_read($count);
|
||||||
if (is_callable($this->readCallback)) {
|
if (is_callable($this->readCallback)) {
|
||||||
call_user_func($this->readCallback, $count);
|
call_user_func($this->readCallback, $result);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue