mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #38254 from nextcloud/backport/38224/stable26
[stable26] Check if version has entity before trying to access it
This commit is contained in:
commit
315a1da12c
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