Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-24 20:23:38 +0300
committerJoas Schilling <coding@schilljs.com>2020-03-24 20:23:38 +0300
commitf3a5bd6753f10dc511ee90a1f042477120e0da33 (patch)
tree76dc8046ceb90a584e88d6076fc1e24be0d17962 /apps
parent3e338c907533dd77599b576ecfadd44b3d1a9855 (diff)
Fix generated avatars and nophoto cache files
Since nextcloud/server#19493 newFile() by default does not write the file anymore. Setting an empty string as content will make it write the file immediate, without having to call putContent() afterwards. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CardDAV/PhotoCache.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php
index c02280a0bec..99c0d1817c3 100644
--- a/apps/dav/lib/CardDAV/PhotoCache.php
+++ b/apps/dav/lib/CardDAV/PhotoCache.php
@@ -108,7 +108,7 @@ class PhotoCache {
$data = $this->getPhoto($card);
if ($data === false || !isset($data['Content-Type'])) {
- $folder->newFile('nophoto');
+ $folder->newFile('nophoto', '');
return;
}
@@ -116,7 +116,7 @@ class PhotoCache {
$extension = self::ALLOWED_CONTENT_TYPES[$contentType] ?? null;
if ($extension === null) {
- $folder->newFile('nophoto');
+ $folder->newFile('nophoto', '');
return;
}