Do not just write foobar

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-03-04 17:14:32 +01:00
parent daee222534
commit c8d1b29407
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -169,9 +169,12 @@ class File extends Node implements IFile {
if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) {
if (!is_resource($data)) {
$data = fopen('php://temp', 'r+');
fwrite($data, 'foobar');
rewind($data);
$tmpData = fopen('php://temp', 'r+');
if ($data !== null) {
fwrite($tmpData, $data);
rewind($tmpData);
}
$data = $tmpData;
}
$isEOF = false;