From c473c722731468a3b01cb1ae1558a2af58b46f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=AFeul=20Rouquette?= Date: Tue, 5 Jul 2022 12:28:09 +0200 Subject: [PATCH] =?UTF-8?q?Pour=20supprimer=20une=20chaine=20en=20d=C3=A9b?= =?UTF-8?q?ut=20/=20fin=20de=20chaine,=20il=20ne=20faut=20pas=20utiliser?= =?UTF-8?q?=20`trim()`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- formidable_retour_etendu_pipelines.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/formidable_retour_etendu_pipelines.php b/formidable_retour_etendu_pipelines.php index 5cf41e6..bdf47c6 100644 --- a/formidable_retour_etendu_pipelines.php +++ b/formidable_retour_etendu_pipelines.php @@ -29,7 +29,8 @@ function formidable_retour_etendu_formidable_pre_raccourcis_arobases(array $flux $data = str_replace($m[0], '', $data); } else { $remplace = trim($m[5]); - $remplace = trim($remplace, _AUTOBR); + $remplace = preg_replace('#^'._AUTOBR.'#', '', $remplace); + $remplace = preg_replace('#'._AUTOBR.'$#', '', $remplace); $data = str_replace($m[0], $remplace, $data); } }