From f187d68585872267c34836c153bdaf097aa6ceac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=AFeul=20Rouquette?= <maieul@maieul.net> Date: Fri, 16 Apr 2021 23:40:42 +0200 Subject: [PATCH] fix warning potentiel sur le tout premier traitement --- formulaires/formidable.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/formulaires/formidable.php b/formulaires/formidable.php index 9cad8391..69b06bf6 100644 --- a/formulaires/formidable.php +++ b/formulaires/formidable.php @@ -422,6 +422,7 @@ function formulaires_formidable_traiter_dist($id, $valeurs = array(), $id_formul $retours['traitements'] = array(); $erreur_texte = ''; + // Si on a des traitements if (is_array($traitements) and !empty($traitements)) { $maxiter = 5; @@ -433,6 +434,7 @@ function formulaires_formidable_traiter_dist($id, $valeurs = array(), $id_formul if ($appliquer_traitement = charger_fonction($type_traitement, 'traiter/', true)) { spip_log("Application du traitement $type_traitement", 'formidable'._LOG_INFO); $retours['scripts_ok'] = ''; + $retours['message_ok'] = ''; $retours = $appliquer_traitement( array( 'formulaire' => $formulaire, @@ -451,7 +453,6 @@ function formulaires_formidable_traiter_dist($id, $valeurs = array(), $id_formul ) { $messages_ok .= wrap($retours['message_ok'],'<div class="message_retour_traitement message_retour_'.$type_traitement.'">'); } - $retours['message_ok'] = ''; // Inutile de les exposer aux autres traitements $messages_ok .= $retours['scripts_ok']; } else { // traitement introuvable, ne pas retenter -- GitLab