diff --git a/src/Stream.php b/src/Stream.php index bcc59ba..067750e 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -70,7 +70,9 @@ public static function create($body = ''): StreamInterface if (\is_string($body)) { $resource = \fopen('php://temp', 'rw+'); - \fwrite($resource, $body); + if (\fwrite($resource, $body)) { + \rewind($resource); + } $body = $resource; }