From 8152189b095cee64ed2eb1b3f4add65b76f140ff Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 24 Feb 2021 11:01:32 +0100 Subject: [PATCH] Only write checksum if we have a valid file info Signed-off-by: Christoph Wurst --- apps/dav/lib/Connector/Sabre/File.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index c6213cdbc8194..19bcb53d9cb0c 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -680,9 +680,12 @@ private function convertToSabreException(\Exception $e) { /** * Get the checksum for this file * - * @return string + * @return string|null */ public function getChecksum() { + if (!$this->info) { + return null; + } return $this->info->getChecksum(); }