diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-03-04 21:26:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 21:26:20 +0100 |
commit | eb175584f64bee35dc1b88b9b3f61db0175b9426 (patch) | |
tree | 98c716ebcd612ac97a537df77a9f81366e0ae75e /apps/dav | |
parent | 79ec7bbcf64fb7edc3ef8b2dbe4fee4173736c2e (diff) | |
parent | c8d1b294074db3813493090aee3056313a9c1425 (diff) | |
download | nextcloud-server-eb175584f64bee35dc1b88b9b3f61db0175b9426.tar.gz nextcloud-server-eb175584f64bee35dc1b88b9b3f61db0175b9426.zip |
Merge pull request #14514 from nextcloud/fix/no_debug_output
Do not just write foobar
Diffstat (limited to 'apps/dav')
-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 fe301d93729..3c42f66a04a 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; |