From 8ada0bc2165a0a1a02b22ecfd056bb9ce1440b5e Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Mon, 5 Jul 2021 18:17:35 +0200 Subject: [PATCH] added ')' when trimming message string --- include/fonctions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fonctions.inc.php b/include/fonctions.inc.php index e1fc1b6..86edc74 100644 --- a/include/fonctions.inc.php +++ b/include/fonctions.inc.php @@ -104,7 +104,7 @@ function replaceVariables($db, $text, $dico) :array $var = substr($text, $posVar+1, $posEsp-$posVar-1); } $posVar = $posEsp+1; - $var = trim($var, " .\n\r"); + $var = trim($var, " .\n\r)"); $varReplace = "$" . $var; if ( isset ($variables[$var]) ) @@ -124,7 +124,7 @@ function replaceVariables($db, $text, $dico) :array { $varText = '' . $varText . ""; } - $text = str_replace($varReplace, $varText, $text); + $text = str_replace($varReplace, $varText, $text); //remplace la variable dans le texte }else { break; }