forked from extern/egroupware
fix PHP 8.1 error/mysqli_sql_exception: Invalid character set was provided (utf-8 instead of utf8)
This commit is contained in:
parent
73662af7b2
commit
64c9507912
@ -227,9 +227,12 @@ class Egw extends Egw\Base
|
|||||||
// for the migration: reference us to the old phpgw object
|
// for the migration: reference us to the old phpgw object
|
||||||
$GLOBALS['phpgw'] =& $this;
|
$GLOBALS['phpgw'] =& $this;
|
||||||
|
|
||||||
if ($GLOBALS['egw_info']['server']['system_charset'])
|
try {
|
||||||
{
|
// set our default charset
|
||||||
$this->db->Link_ID->SetCharSet($GLOBALS['egw_info']['server']['system_charset']);
|
$this->db->Link_ID->SetCharSet($this->db->Type === 'mysql' ? 'utf8' : 'utf-8');
|
||||||
|
}
|
||||||
|
catch (\Throwable $e) {
|
||||||
|
_egw_log_exception($e);
|
||||||
}
|
}
|
||||||
// restoring server timezone, to avoid warnings under php5.3
|
// restoring server timezone, to avoid warnings under php5.3
|
||||||
if (!empty($GLOBALS['egw_info']['server']['server_timezone']))
|
if (!empty($GLOBALS['egw_info']['server']['server_timezone']))
|
||||||
|
Loading…
Reference in New Issue
Block a user