From 03420ee885da4befefb839aa9f6c7215f6624414 Mon Sep 17 00:00:00 2001 From: Cerdic <cedric@yterium.com> Date: Wed, 17 Feb 2021 11:31:01 +0100 Subject: [PATCH] Fix l'utilisation du niveau de log 0 (maieul) cf https://git.spip.net/spip/spip/pulls/106 --- ecrire/inc/utils.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index 536c2f36fa..35f18cedbe 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -356,9 +356,12 @@ function spip_log($message = null, $name = null) { if (!isset($regs[1]) or !$logname = $regs[1]) { $logname = null; } - if (!isset($regs[2]) or !$niveau = $regs[2]) { + if (!isset($regs[2])) { $niveau = _LOG_INFO; } + else { + $niveau = intval($regs[2]); + } if ($niveau <= (defined('_LOG_FILTRE_GRAVITE') ? _LOG_FILTRE_GRAVITE : _LOG_INFO_IMPORTANTE)) { if (!$pre) { -- GitLab