Fix #2068 type error in utf8_clean()

This commit is contained in:
Kijin Sung 2023-01-17 21:04:33 +09:00
parent 651238916b
commit ca35eda1da

View file

@ -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);