diff options
author | Thomas Citharel <tcit@tcit.fr> | 2022-12-03 17:25:32 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2022-12-03 17:25:32 +0100 |
commit | a5b6119ec4e3ba1fb84c5553b7bed2bcd28690d6 (patch) | |
tree | fd82db1d791f494ea1382db98e6cf3ddcc03d351 | |
parent | 299f979d94d32ca9305a19aa641c79b50577a738 (diff) | |
download | nextcloud-server-a5b6119ec4e3ba1fb84c5553b7bed2bcd28690d6.tar.gz nextcloud-server-a5b6119ec4e3ba1fb84c5553b7bed2bcd28690d6.zip |
Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
-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) { |