diff --git a/lib/private/Log.php b/lib/private/Log.php index d2bf8e40e77bc..ddccf87e07354 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -281,7 +281,8 @@ public function getLogLevel($context): int { } } - return min($this->config->getValue('loglevel', ILogger::WARN) ?? ILogger::WARN, ILogger::FATAL); + $configLogLevel = $this->config->getValue('loglevel', ILogger::WARN); + return min(is_int($configLogLevel) ? $configLogLevel : ILogger::WARN, ILogger::FATAL); } /**