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

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/DocumentService.php')
-rw-r--r--lib/Service/DocumentService.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Service/DocumentService.php b/lib/Service/DocumentService.php
index f2784da5c..31dcb6910 100644
--- a/lib/Service/DocumentService.php
+++ b/lib/Service/DocumentService.php
@@ -237,6 +237,10 @@ class DocumentService {
$file = $this->getFileByShareToken($token, $filePath);
}
+ if ($file === null) {
+ throw new NotFoundException();
+ }
+
if ($this->isReadOnly($file, $token)) {
return $document;
}