summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLouis <6653109+artonge@users.noreply.github.com>2023-05-15 11:26:27 +0200
committerGitHub <noreply@github.com>2023-05-15 11:26:27 +0200
commit2f467d936c7629d42f65e8210a5d27f8eda205a3 (patch)
tree25f14483c6cfe8a582b8bf1e4e7ebd137622bf2d /apps
parent7fd453eb10d98a9ec1862f1506f6c1b82f38b54d (diff)
parentd6eb48c436ad3a8ede7e841bd1a1995ee025b43c (diff)
downloadnextcloud-server-2f467d936c7629d42f65e8210a5d27f8eda205a3.tar.gz
nextcloud-server-2f467d936c7629d42f65e8210a5d27f8eda205a3.zip
Merge pull request #38224 from nextcloud/versionEntityisSet
Check if version has entity before trying to access it
Diffstat (limited to 'apps')
-rw-r--r--apps/files_versions/lib/Storage.php2
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);
}