Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-12-03 17:25:32 +01:00
parent 299f979d94
commit a5b6119ec4
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -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) {