mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Check for non-numeric versions, not non-integer
All versions are string Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
58a950b8a0
commit
f3f2b0f0a8
1 changed files with 2 additions and 2 deletions
|
|
@ -721,13 +721,13 @@ class Storage {
|
|||
}
|
||||
|
||||
foreach ($versions as $key => $version) {
|
||||
if (!is_int($version['version'])) {
|
||||
if (!is_numeric($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])) {
|
||||
if ($expiration->isExpired((int)($version['version']), $quotaExceeded) && !isset($toDelete[$key])) {
|
||||
$size += $version['size'];
|
||||
$toDelete[$key] = $version['path'] . '.v' . $version['version'];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue