summaryrefslogtreecommitdiff
path: root/vendor/guzzlehttp/psr7/src/PumpStream.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/guzzlehttp/psr7/src/PumpStream.php')
-rw-r--r--vendor/guzzlehttp/psr7/src/PumpStream.php6
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);