Stream checks isSeeakable before calling rewind in __toString
This commit is contained in:
parent
15da2ab805
commit
b06abc0df2
|
|
@ -48,7 +48,9 @@ class Stream implements StreamInterface
|
|||
{
|
||||
$string = "";
|
||||
try {
|
||||
if ($this->isSeekable()) {
|
||||
rewind($this->resource);
|
||||
}
|
||||
$string = $this->getContents();
|
||||
} catch (\Exception $e) {
|
||||
// Silence exceptions in order to conform with PHP's string casting operations.
|
||||
|
|
|
|||
Loading…
Reference in New Issue