diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2023-05-12 16:00:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 16:00:16 +0200 |
commit | d6eb48c436ad3a8ede7e841bd1a1995ee025b43c (patch) | |
tree | b96c79f7feeb4f6b6d86308df6403a831d888daa /apps/files_versions | |
parent | ba867b6257941a01e0ac3591114fbd660499ee8d (diff) | |
download | nextcloud-server-d6eb48c436ad3a8ede7e841bd1a1995ee025b43c.tar.gz nextcloud-server-d6eb48c436ad3a8ede7e841bd1a1995ee025b43c.zip |
Check if version has entity before trying to access it
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/Storage.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index cd13e74e786..0b7debc126a 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -609,7 +609,7 @@ class Storage { $internalPath = $version->getInternalPath(); \OC_Hook::emit('\OCP\Versions', 'preDelete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]); - $versionEntity = $versionEntities[$version->getId()]; + $versionEntity = isset($versionEntities[$version->getId()]) ? $versionEntities[$version->getId()] : null; if (!is_null($versionEntity)) { $versionsMapper->delete($versionEntity); } |