diff options
author | Andrew Dolgov <[email protected]> | 2023-10-20 16:44:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-20 16:44:35 +0300 |
commit | 8bec661288b276c98bdb0e773e5f4d5275dc4c87 (patch) | |
tree | 8617ebe581c62fc46a7881aa61801ebce9d3c603 /vendor/guzzlehttp/psr7/src/PumpStream.php | |
parent | 540438c2eb5452bacad30c247906bfa287f2da1d (diff) |
Diffstat (limited to 'vendor/guzzlehttp/psr7/src/PumpStream.php')
-rw-r--r-- | vendor/guzzlehttp/psr7/src/PumpStream.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php index e90389c..5585190 100644 --- a/vendor/guzzlehttp/psr7/src/PumpStream.php +++ b/vendor/guzzlehttp/psr7/src/PumpStream.php @@ -34,7 +34,7 @@ final class PumpStream implements StreamInterface private $buffer; /** - * @param callable(int): (string|null|false) $source Source of the stream data. The callable MAY + * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY * accept an integer argument used to control the * amount of data to return. The callable MUST * return a string when called, or false|null on error @@ -60,6 +60,7 @@ final class PumpStream implements StreamInterface throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -149,8 +150,6 @@ final class PumpStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) @@ -169,6 +168,7 @@ final class PumpStream implements StreamInterface $data = call_user_func($this->source, $length); if ($data === false || $data === null) { $this->source = null; + return; } $this->buffer->write($data); |