summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-24 11:01:32 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-22 21:11:07 +0100
commit8152189b095cee64ed2eb1b3f4add65b76f140ff (patch)
tree3b1e41cd1127b7992e0551f22c04f4b2367092ea
parent268acd301dafa90917e30cea8370b9cc27b7a2c6 (diff)
downloadnextcloud-server-8152189b095cee64ed2eb1b3f4add65b76f140ff.tar.gz
nextcloud-server-8152189b095cee64ed2eb1b3f4add65b76f140ff.zip
Only write checksum if we have a valid file info
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-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();
}