From 542ae3fc77535490f8d3a5367822e596fb184c21 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sat, 20 Jun 2026 20:00:15 +0200 Subject: [PATCH] fix(log.class): cast maxSizeLog to int with correct default in chunk() --- core/class/log.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/class/log.class.php b/core/class/log.class.php index b63bac7267..ab7857918f 100644 --- a/core/class/log.class.php +++ b/core/class/log.class.php @@ -147,7 +147,7 @@ public static function chunk($_log = '', $_onlyIfSizeExceeded = False) { } foreach ($paths as $path) { if (is_file($path)) { - if ($_onlyIfSizeExceeded && filesize($path) < (self::getConfig('maxSizeLog') * 1024 * 1024)) { + if ($_onlyIfSizeExceeded && filesize($path) < ((int)self::getConfig('maxSizeLog', 5) * 1024 * 1024)) { continue; } self::chunkLog($path); @@ -165,7 +165,7 @@ private static function chunkLog(string $rawPath) { $maxLineLog = self::DEFAULT_MAX_LINE; } - $maxSizeLog = (int)self::getConfig('maxSizeLog', 10); + $maxSizeLog = (int)self::getConfig('maxSizeLog', 5); $maxSizeLog = max(1, $maxSizeLog); $maxBytes = $maxSizeLog * 1024 * 1024;