diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-03-04 17:14:32 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-03-04 17:14:32 +0100 |
commit | c8d1b294074db3813493090aee3056313a9c1425 (patch) | |
tree | 16af1584dbdce8c601e67afa64f2f7e924c11f28 /apps | |
parent | daee222534f3850e7689066e5391a7f3a9b9d452 (diff) | |
download | nextcloud-server-c8d1b294074db3813493090aee3056313a9c1425.tar.gz nextcloud-server-c8d1b294074db3813493090aee3056313a9c1425.zip |
Do not just write foobar
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 8aa7d66ba34..d2d9420292f 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -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; |