From 48b4ad1f0dd042c2974ffddd2e4b732122861276 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 20 Oct 2016 10:35:12 +1100 Subject: [PATCH] Ensure that only strings get encoded --- CRM/Utils/Array.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Array.php b/CRM/Utils/Array.php index 8537409d36..d82250cc74 100644 --- a/CRM/Utils/Array.php +++ b/CRM/Utils/Array.php @@ -1088,9 +1088,12 @@ class CRM_Utils_Array { if (is_array($value)) { $array[$key] = self::encode_items($value); } - else { + elseif (is_string($value)) { $array[$key] = mb_convert_encoding($value, mb_detect_encoding($value, mb_detect_order(), TRUE), 'UTF-8'); } + else { + $array[$key] = $value; + } } return $array; } -- 2.25.1