Merge pull request #14521 from nextcloud/backport/14514/stable15
[stable15] Do not just write foobar
This commit is contained in:
commit
ec9e82a689
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue