From 61a311181e488cf10cee13ac7a0ddb9f3d2d0d13 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 21 Jul 2022 13:50:14 +0300 Subject: [PATCH] Fix: files_versions store fix ONLYOFFICE/onlyoffice-nextcloud#660 Signed-off-by: Sergey Linnik --- apps/files_versions/lib/Storage.php | 1 + 1 file changed, 1 insertion(+) 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) {