DTux
/
dtux__avion-poeme
Archived
1
0
Fork 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
1 changed files with 2 additions and 2 deletions

View File

@ -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 = '<a href="' . $varText .'">' . $varText . "</a>";
}
$text = str_replace($varReplace, $varText, $text);
$text = str_replace($varReplace, $varText, $text); //remplace la variable dans le texte
}else {
break;
}