From c7323c2bfeb019074a408a68e0b58f30cb36de01 Mon Sep 17 00:00:00 2001
From: gRoussac
Date: Sun, 3 Nov 2013 22:59:04 +0100
Subject: [PATCH] [-] CORE : Fix bug #PSCFV-10901 warnings on htmlentities
---
classes/Tools.php | 10 ++++++++--
modules/blocksearch/blocksearch-top.tpl | 4 ++--
modules/blocksearch/blocksearch.tpl | 2 +-
themes/default/modules/blocksearch/blocksearch.tpl | 2 +-
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/classes/Tools.php b/classes/Tools.php
index 44eb80ce3..1ee27abca 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -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');
}
diff --git a/modules/blocksearch/blocksearch-top.tpl b/modules/blocksearch/blocksearch-top.tpl
index 5a5918662..83b247f89 100644
--- a/modules/blocksearch/blocksearch-top.tpl
+++ b/modules/blocksearch/blocksearch-top.tpl
@@ -29,7 +29,7 @@
-
+
{else}
@@ -41,7 +41,7 @@
-
+
diff --git a/modules/blocksearch/blocksearch.tpl b/modules/blocksearch/blocksearch.tpl
index d4dac74b7..ce9b45f74 100644
--- a/modules/blocksearch/blocksearch.tpl
+++ b/modules/blocksearch/blocksearch.tpl
@@ -32,7 +32,7 @@
-
+
diff --git a/themes/default/modules/blocksearch/blocksearch.tpl b/themes/default/modules/blocksearch/blocksearch.tpl
index 591644331..92d286177 100644
--- a/themes/default/modules/blocksearch/blocksearch.tpl
+++ b/themes/default/modules/blocksearch/blocksearch.tpl
@@ -32,7 +32,7 @@
-
+