diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2023-05-15 11:26:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 11:26:27 +0200 |
commit | 2f467d936c7629d42f65e8210a5d27f8eda205a3 (patch) | |
tree | 25f14483c6cfe8a582b8bf1e4e7ebd137622bf2d /apps | |
parent | 7fd453eb10d98a9ec1862f1506f6c1b82f38b54d (diff) | |
parent | d6eb48c436ad3a8ede7e841bd1a1995ee025b43c (diff) | |
download | nextcloud-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.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); } |