diff --git a/src/file/base/Stream.php b/src/file/base/Stream.php index 5963a9d..e83a5ab 100644 --- a/src/file/base/Stream.php +++ b/src/file/base/Stream.php @@ -290,7 +290,7 @@ class Stream extends AbstractIterator implements IReader, IWriter { } function unserialize(?array $options=null, bool $close=true, bool $alreadyLocked=false) { - $args = [$this->getContents($alreadyLocked)]; + $args = [$this->getContents($close, $alreadyLocked)]; if ($options !== null) $args[] = $options; return unserialize(...$args); } @@ -412,6 +412,6 @@ class Stream extends AbstractIterator implements IReader, IWriter { } function serialize($object, bool $close=true, bool $alreadyLocked=false): void { - $this->putContents(serialize($object), $alreadyLocked); + $this->putContents(serialize($object), $close, $alreadyLocked); } }