Merge pull request #35576 from nextcloud/handle-possible-null-value-in-new-simple-file

Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile
This commit is contained in:
Simon L 2022-12-06 19:52:55 +01:00 committed by GitHub
commit 2e0d262864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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