[-] CORE : Fix bug #PSCFV-10901 warnings on htmlentities

This commit is contained in:
gRoussac
2013-11-03 22:59:04 +01:00
parent 2a3192d98c
commit c7323c2bfe
4 changed files with 12 additions and 6 deletions
+8 -2
View File
@@ -672,14 +672,20 @@ class ToolsCore
public static function htmlentitiesUTF8($string, $type = ENT_QUOTES)
{
if (is_array($string))
return array_map(array('Tools', 'htmlentitiesUTF8'), $string);
{
$string = array_map(array('Tools', 'htmlentitiesUTF8'), $string);
return (string)array_shift($string);
}
return htmlentities((string)$string, $type, 'utf-8');
}
public static function htmlentitiesDecodeUTF8($string)
{
if (is_array($string))
return array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string);
{
$string = array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string);
return (string)array_shift($string);
}
return html_entity_decode((string)$string, ENT_QUOTES, 'utf-8');
}