1
0

added ')' when trimming message string

This commit is contained in:
Daniel Tartavel 2021-07-05 18:17:35 +02:00
parent 715b647844
commit 8ada0bc216

View File

@ -104,7 +104,7 @@ function replaceVariables($db, $text, $dico) :array
$var = substr($text, $posVar+1, $posEsp-$posVar-1); $var = substr($text, $posVar+1, $posEsp-$posVar-1);
} }
$posVar = $posEsp+1; $posVar = $posEsp+1;
$var = trim($var, " .\n\r"); $var = trim($var, " .\n\r)");
$varReplace = "$" . $var; $varReplace = "$" . $var;
if ( isset ($variables[$var]) ) if ( isset ($variables[$var]) )
@ -124,7 +124,7 @@ function replaceVariables($db, $text, $dico) :array
{ {
$varText = '<a href="' . $varText .'">' . $varText . "</a>"; $varText = '<a href="' . $varText .'">' . $varText . "</a>";
} }
$text = str_replace($varReplace, $varText, $text); $text = str_replace($varReplace, $varText, $text); //remplace la variable dans le texte
}else { }else {
break; break;
} }