Factorize

This commit is contained in:
Ymage 2016-04-07 22:49:15 +02:00
parent 7672a10776
commit af8b3b649e

View file

@ -246,17 +246,10 @@ final class Tools
$data[$k] = self::utf8ize($v);
}
}
else if (is_string ($data))
{
if ('' == mb_detect_encoding($data))
else if (is_string ($data) && '' == mb_detect_encoding($data))
{
return utf8_encode($data);
}
else
{
return $data;
}
}
return $data;
}