mirror of
https://github.com/nextcloud/server.git
synced 2026-04-29 01:50:33 -04:00
Merge pull request #38224 from nextcloud/versionEntityisSet
Check if version has entity before trying to access it
This commit is contained in:
commit
2f467d936c
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue