diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-05 17:44:25 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-05 17:50:45 +0200 |
commit | a6b1d990a420beb229b7c9935eb86f5b3eacc383 (patch) | |
tree | 21a4073c496f1c85a8b3dd6d0383705c3fb3b22a /apps/files_versions | |
parent | 8cc8765089274ef8a80bc398ed7cc38b0df214f9 (diff) | |
download | nextcloud-server-a6b1d990a420beb229b7c9935eb86f5b3eacc383.tar.gz nextcloud-server-a6b1d990a420beb229b7c9935eb86f5b3eacc383.zip |
Check for non-numeric versions, not non-integer
All versions are string
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/Storage.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index fd2417dc6d7..fb43e24b147 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -716,13 +716,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']; } |