mirror of
https://github.com/nextcloud/server.git
synced 2026-06-19 21:49:43 -04:00
Ignore and log non integer versions
This avoids being stuck when there is one buggy file version with a non-integer version. It allows the expiration process to not crash and continue with the other ones. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
2dc96b3148
commit
8cc8765089
1 changed files with 6 additions and 0 deletions
|
|
@ -716,6 +716,12 @@ class Storage {
|
|||
}
|
||||
|
||||
foreach ($versions as $key => $version) {
|
||||
if (!is_int($version['version'])) {
|
||||
\OC::$server->get(LoggerInterface::class)->error(
|
||||
'Found a non-numeric timestamp version: '. json_encode($version),
|
||||
['app' => 'files_versions']);
|
||||
continue;
|
||||
}
|
||||
if ($expiration->isExpired($version['version'], $quotaExceeded) && !isset($toDelete[$key])) {
|
||||
$size += $version['size'];
|
||||
$toDelete[$key] = $version['path'] . '.v' . $version['version'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue