diff --git a/blocklog_fonctions.php b/blocklog_fonctions.php index 2f83b02..0538bad 100755 --- a/blocklog_fonctions.php +++ b/blocklog_fonctions.php @@ -41,7 +41,7 @@ function blockchaine_sur_pdf(){ return false; } -function afficher_blocklog($texte, $id_dossier, $objet, $type = 'chaine'){ +function afficher_blocklog($texte = '', $id_dossier, $objet, $type = 'chaine'){ $objet = trim($objet); $blockchaine = ''; @@ -57,6 +57,9 @@ function afficher_blocklog($texte, $id_dossier, $objet, $type = 'chaine'){ $blockchaine .= ''; } } + if (empty($texte)) { + return $blockchaine; + } $texte = str_replace('@@blockchaine@@', $blockchaine, $texte); $texte = str_replace('@@blocklog@@', $blockchaine, $texte);