added ')' when trimming message string
This commit is contained in:
parent
715b647844
commit
8ada0bc216
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user