diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-23 12:13:32 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-02-07 11:23:30 +0100 |
commit | d00422b812d27df56ca9e07159fc14073357f0c4 (patch) | |
tree | 2a21f9cb6e6ea432b67551d8df7416bacc1a5540 /core/Command | |
parent | 0753be3ff29b459bdbb23deecc37c3e4c05d8464 (diff) | |
download | nextcloud-server-d00422b812d27df56ca9e07159fc14073357f0c4.tar.gz nextcloud-server-d00422b812d27df56ca9e07159fc14073357f0c4.zip |
Fix computerFileSize when called with a string without unit
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Log/File.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php index f2c77e20174..6d6e530fe9a 100644 --- a/core/Command/Log/File.php +++ b/core/Command/Log/File.php @@ -115,14 +115,12 @@ class File extends Command implements Completion\CompletionAwareInterface { } /** - * @param mixed $rotateSize * @throws \InvalidArgumentException */ - protected function validateRotateSize(&$rotateSize) { + protected function validateRotateSize(false|int|float $rotateSize): void { if ($rotateSize === false) { throw new \InvalidArgumentException('Error parsing log rotation file size'); } - $rotateSize = (int) $rotateSize; if ($rotateSize < 0) { throw new \InvalidArgumentException('Log rotation file size must be non-negative'); } |