From 0ddd2b194f7350ebeebbb6829b8c099f642bb139 Mon Sep 17 00:00:00 2001 From: Vincent Maury Date: Wed, 22 Oct 2025 02:32:36 +0200 Subject: [PATCH] Fix 35865 no formail displayed in supplier payment (#35867) Co-authored-by: vmaury Co-authored-by: Laurent Destailleur --- htdocs/core/class/html.formmail.class.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 176e3fe3d90..b9b4fc39947 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -651,16 +651,15 @@ class FormMail extends Form $helpforsubstitution = ''; if (is_array($this->substit) && count($this->substit)) { $helpforsubstitution .= $langs->trans('AvailableVariables').' :

'."\n"; - } - foreach ($this->substit as $key => $val) { - // Do not show deprecated variables into the tooltip help of substitution variables - if (in_array($key, array('__NEWREF__', '__REFCLIENT__', '__REFSUPPLIER__', '__SUPPLIER_ORDER_DATE_DELIVERY__', '__SUPPLIER_ORDER_DELAY_DELIVERY__'))) { - continue; + foreach ($this->substit as $key => $val) { + // Do not show deprecated variables into the tooltip help of substitution variables + if (in_array($key, array('__NEWREF__', '__REFCLIENT__', '__REFSUPPLIER__', '__SUPPLIER_ORDER_DATE_DELIVERY__', '__SUPPLIER_ORDER_DELAY_DELIVERY__'))) { + continue; + } + if (is_array($val)) $val = implode(', ', $val); // key __MULTICURRENCY_CODE__ is an array and crashes dolGetFirstLineOfText function which accept only text + $helpforsubstitution .= $key.' -> '.$langs->trans(dol_string_nohtmltag(dolGetFirstLineOfText($val))).'
'; + $helpforsubstitution .= '
'; } - $helpforsubstitution .= $key.' -> '.$langs->trans(dol_string_nohtmltag(dolGetFirstLineOfText($val))).'
'; - } - if (is_array($this->substit) && count($this->substit)) { - $helpforsubstitution .= ''; } /*