Do not just write foobar
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
b89b7ae885
commit
3d5904b5cc
|
@ -169,9 +169,12 @@ class File extends Node implements IFile {
|
||||||
if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) {
|
if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) {
|
||||||
|
|
||||||
if (!is_resource($data)) {
|
if (!is_resource($data)) {
|
||||||
$data = fopen('php://temp', 'r+');
|
$tmpData = fopen('php://temp', 'r+');
|
||||||
fwrite($data, 'foobar');
|
if ($data !== null) {
|
||||||
rewind($data);
|
fwrite($tmpData, $data);
|
||||||
|
rewind($tmpData);
|
||||||
|
}
|
||||||
|
$data = $tmpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
$isEOF = false;
|
$isEOF = false;
|
||||||
|
|
Loading…
Reference in New Issue