diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index 3f91e32ef954a..13a636cdb21c1 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -194,6 +194,7 @@ public static function store($filename) { $eventDispatcher = \OC::$server->get(IEventDispatcher::class); $fileInfo = $files_view->getFileInfo($filename); + if ($fileInfo === false) return false; $id = $fileInfo->getId(); $nodes = \OC::$server->get(IRootFolder::class)->getUserFolder($uid)->getById($id); foreach ($nodes as $node) {