Pass the strlen to the readCallback as was expected

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-02-15 12:52:26 +01:00
commit 8c45c9a43b
No known key found for this signature in database
GPG key ID: F941078878347C0C
2 changed files with 7 additions and 2 deletions

View file

@ -97,7 +97,7 @@ class CallbackWrapper extends Wrapper {
public function stream_read($count) {
$result = parent::stream_read($count);
if (is_callable($this->readCallback)) {
call_user_func($this->readCallback, $result);
call_user_func($this->readCallback, strlen($result));
}
return $result;
}