Merge pull request #45932 from carhe/fix-45707

fix(files_versions): avoid unintentional skipping of expiration
This commit is contained in:
Stephan Orbaugh 2024-07-25 12:55:57 +02:00 committed by GitHub
commit ebfd4938f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -896,7 +896,7 @@ class Storage {
$pathparts = pathinfo($path);
$timestamp = (int)substr($pathparts['extension'] ?? '', 1);
$versionEntity = $versionsMapper->findVersionForFileId($file->getId(), $timestamp);
if ($versionEntity->getMetadataValue('label') !== '') {
if ($versionEntity->getMetadataValue('label') !== null && $versionEntity->getMetadataValue('label') !== '') {
continue;
}
$versionsMapper->delete($versionEntity);