diff --git a/plugins/restapi/includes/pdo.php b/plugins/restapi/includes/pdo.php index 3822f83..32fea8f 100644 --- a/plugins/restapi/includes/pdo.php +++ b/plugins/restapi/includes/pdo.php @@ -15,7 +15,7 @@ public static function getConnection() $dbuser = $GLOBALS['database_user']; $dbpass = $GLOBALS['database_password']; $dbname = $GLOBALS['database_name']; - $dbh = new \PDO("mysql:host=$dbhost;dbname=$dbname;charset=UTF8;", $dbuser, $dbpass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8';")); + $dbh = new \PDO("mysql:host=$dbhost;dbname=$dbname;charset=UTF8MB4;", $dbuser, $dbpass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8mb4';")); $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); return $dbh;