From 0bc7fe4cb18167b9aa58f08d0fd49c32438773a6 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 14 Feb 2019 15:28:47 +0100 Subject: [PATCH] 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 --- src/CallbackWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CallbackWrapper.php b/src/CallbackWrapper.php index 4eef556..b5beb20 100644 --- a/src/CallbackWrapper.php +++ b/src/CallbackWrapper.php @@ -90,7 +90,7 @@ public function stream_open($path, $mode, $options, &$opened_path) { public function stream_read($count) { $result = parent::stream_read($count); if (is_callable($this->readCallback)) { - call_user_func($this->readCallback, $count); + call_user_func($this->readCallback, $result); } return $result; }