Merge pull request #14514 from nextcloud/fix/no_debug_output

Do not just write foobar
This commit is contained in:
Roeland Jago Douma 2019-03-04 21:26:20 +01:00 committed by GitHub
commit eb175584f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

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;