From d00422b812d27df56ca9e07159fc14073357f0c4 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 23 Jan 2023 12:13:32 +0100 Subject: Fix computerFileSize when called with a string without unit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Command/Log/File.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/Command/Log') 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'); } -- cgit v1.2.3