mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Check if version has entity before trying to access it
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
8d1c1403cc
commit
7e7223af55
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