diff options
-rw-r--r-- | lib/private/Files/SimpleFS/NewSimpleFile.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/SimpleFS/NewSimpleFile.php b/lib/private/Files/SimpleFS/NewSimpleFile.php index b2a183b7d29..e2d1ae274b1 100644 --- a/lib/private/Files/SimpleFS/NewSimpleFile.php +++ b/lib/private/Files/SimpleFS/NewSimpleFile.php @@ -136,6 +136,10 @@ class NewSimpleFile implements ISimpleFile { * @throws NotFoundException */ private function checkFile(): void { + if (!$this->file) { + throw new NotFoundException('File not set'); + } + $cur = $this->file; while ($cur->stat() === false) { |