]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only write checksum if we have a valid file info 25776/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 24 Feb 2021 10:01:32 +0000 (11:01 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 22 Mar 2021 20:11:07 +0000 (21:11 +0100)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/dav/lib/Connector/Sabre/File.php

index c6213cdbc8194307f9e71f95d2229cc50920451a..19bcb53d9cb0cae0cdd5a935b300da009258df60 100644 (file)
@@ -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();
        }