fix: warning

This commit is contained in:
Christophe 2023-03-30 17:45:27 +02:00
parent 8cd9a772c3
commit 014748da64

View file

@ -5,12 +5,12 @@ if (!defined('_ECRIRE_INC_VERSION')) {
/**
* fonction pour les remplacements génériques fournis par gamumail
*
*
* @param array $args = ['slug' => $slug, 'destinataires' => $pour, [$options]]
* @param string $data = $html
*
*
* @return $html
*
*
**/
function inc_gamumail_remplacements_dist($args, $html) {
/**
@ -24,8 +24,12 @@ function inc_gamumail_remplacements_dist($args, $html) {
and $prenom = sql_getfetsel('prenom', 'spip_auteurs', 'email='.sql_quote($args['destinataires'][0]))) {
$nom = $prenom.' '.$nom;
}
$html = gamumail_remplacer_modele('nom', ucwords($nom), $html);
$html = gamumail_remplacer_modele('prenom', ucwords($prenom), $html);
if ($nom) {
$html = gamumail_remplacer_modele('nom', ucwords($nom), $html);
}
if ($prenom) {
$html = gamumail_remplacer_modele('prenom', ucwords($prenom), $html);
}
/**
* @@url_site@@ => URL du site