From 2702eee3daeee07835ad27c02bc1d2dae4e9edd9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Nov 2008 01:39:47 +0000 Subject: [PATCH] Fix: Warning with PHP4 --- htdocs/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index f84699911e6..e55f3798555 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -2754,9 +2754,8 @@ function dol_htmlcleanlastbr($stringtodecode) */ function dol_entity_decode($stringhtml,$pagecodeto='UTF-8') { - //print 'x'.$stringhtml; - //$ret=html_entity_decode($stringhtml,ENT_COMPAT,$pagecodeto); - $ret=html_entity_decode($stringhtml,ENT_COMPAT); + // We use @ to avoid warning on PHP4 that does not support entity decoding to UTF8; + $ret=@html_entity_decode($stringhtml,ENT_COMPAT,$pagecodeto); return $ret; }