diff --git a/common/functions.php b/common/functions.php index 60b8bef90..7aa79e052 100644 --- a/common/functions.php +++ b/common/functions.php @@ -623,6 +623,7 @@ function utf8_check($str) function utf8_clean($str) { // Check if the input is a valid UTF-8 string. + $str = (string)$str; if (!utf8_check($str)) { $str = @iconv('UTF-8', 'UTF-8//IGNORE', $str);