Skip to content

Commit fc4f211

Browse files
committed
Ensure the loglevel is honored and if not matching any submitted level fallback to FATAL
1 parent bb45801 commit fc4f211

File tree

1 file changed

+1
-1
lines changed
  • lib/Interpreter/Functions/Output

1 file changed

+1
-1
lines changed

lib/Interpreter/Functions/Output/Log.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function run($message = '', $level = 1, $context = []) {
2727
}
2828

2929
$level = is_int($level) ? $level : 1;
30-
$level = max(min($level, 0), 4);
30+
$level = ($level >= 0 && $level <= 4) ? $level : 4;
3131
$context = is_array($context) ? $context : [];
3232

3333
$this->logger->log($level, $message, $context);

0 commit comments

Comments
 (0)