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
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-24 13:01:32 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-22 23:11:07 +0300
commit8152189b095cee64ed2eb1b3f4add65b76f140ff (patch)
tree3b1e41cd1127b7992e0551f22c04f4b2367092ea /apps/dav/lib/Connector/Sabre/File.php
parent268acd301dafa90917e30cea8370b9cc27b7a2c6 (diff)
Only write checksum if we have a valid file info
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/File.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index c6213cdbc81..19bcb53d9cb 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -680,9 +680,12 @@ class File extends Node implements IFile {
/**
* Get the checksum for this file
*
- * @return string
+ * @return string|null
*/
public function getChecksum() {
+ if (!$this->info) {
+ return null;
+ }
return $this->info->getChecksum();
}