mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
fix/catch PHP 8.0 ValueError: mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "cp1250"
This commit is contained in:
parent
43ae41cae7
commit
1ea91d8721
@ -947,10 +947,15 @@ class Translation
|
|||||||
{
|
{
|
||||||
return utf8_decode($data);
|
return utf8_decode($data);
|
||||||
}
|
}
|
||||||
if (self::$mbstring && !$prefer_iconv && ($data = @mb_convert_encoding($data,$to,$from)) != '')
|
try {
|
||||||
|
if (self::$mbstring && !$prefer_iconv && ($data = @mb_convert_encoding($data, $to, $from)) != '')
|
||||||
{
|
{
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (\ValueError $e) {
|
||||||
|
// ignore encodings unknown to mb_convert_encoding
|
||||||
|
}
|
||||||
if (function_exists('iconv'))
|
if (function_exists('iconv'))
|
||||||
{
|
{
|
||||||
// iconv can not convert from/to utf7-imap
|
// iconv can not convert from/to utf7-imap
|
||||||
|
Loading…
Reference in New Issue
Block a user