From e7ea57d183a7c881cba94949641e13d498620740 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 11 Sep 2022 19:22:51 +0200 Subject: [PATCH] FIX avoid warning (php7+) --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b63bb68c4a5..e6c69cadc96 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1448,9 +1448,9 @@ function dol_escape_htmltag($stringtoescape, $keepb = 0, $keepn = 0, $noescapeta // escape quotes and backslashes, newlines, etc. if ($escapeonlyhtmltags) { - $tmp = htmlspecialchars_decode($stringtoescape, ENT_COMPAT); + $tmp = htmlspecialchars_decode((string) $stringtoescape, ENT_COMPAT); } else { - $tmp = html_entity_decode($stringtoescape, ENT_COMPAT, 'UTF-8'); + $tmp = html_entity_decode((string) $stringtoescape, ENT_COMPAT, 'UTF-8'); } if (!$keepb) { $tmp = strtr($tmp, array(""=>'', ''=>''));