mirror of
https://github.com/nextcloud/server.git
synced 2025-03-17 01:34:07 +00:00
Handle possible null value for file in OC\Files\SimpleFS\NewSimpleFile
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
299f979d94
commit
a5b6119ec4
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue