From 1739a6ec5f9166d345da2dcd4f4e17d5b9bd88d5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 5 Jan 2026 12:42:09 +0100 Subject: [PATCH] Fix warning --- htdocs/core/lib/functions2.lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index f7526b8b856..c8a99008f6e 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -3059,10 +3059,10 @@ function removeEmoji($text, $allowedemoji = 1) /** * Clean a cell to respect rules of CSV file cells * - * @param string $newvalue String to clean (must be UTF-8 encoded) - * @param string $charset Expected output character set ('UTF-8', 'ISO-8859-1', ...). Default '' will use the value into EXPORT_CSV_FORCE_CHARSET. - * @param string $separator CSV char separator (often ',' or ';'). Default '' will use the value into EXPORT_CSV_SEPARATOR_TO_USE. - * @return string Value cleaned + * @param string|int|float $newvalue String to clean (must be UTF-8 encoded) + * @param string $charset Expected output character set ('UTF-8', 'ISO-8859-1', ...). Default '' will use the value into EXPORT_CSV_FORCE_CHARSET. + * @param string $separator CSV char separator (often ',' or ';'). Default '' will use the value into EXPORT_CSV_SEPARATOR_TO_USE. + * @return string Value cleaned */ function csvClean($newvalue, $charset = '', $separator = '') { @@ -3078,7 +3078,7 @@ function csvClean($newvalue, $charset = '', $separator = '') } - $newvalue = $langs->convToOutputCharset($newvalue, 'UTF-8', $charset); // newvalue is now encoded into $charset + $newvalue = $langs->convToOutputCharset((string) $newvalue, 'UTF-8', $charset); // newvalue is now encoded into $charset // Rule Dolibarr: No HTML