Fix charset of mysql queries to use proper utf8mb4 instead of the bad utf8 from mysql, this should allow unicode smiley in messages.

This commit is contained in:
osaajani 2021-04-26 02:41:41 +02:00
parent b325ae1a7e
commit 4430d95d40
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
v3.1.0
v3.1.1

View File

@ -33,7 +33,7 @@
* @param string $password : Le mot de passe à employer
* @return mixed : Un objet \PDO ou false en cas d'erreur
*/
public static function _connect ($host, $dbname, $user, $password, ?string $charset = 'UTF8', ?array $options = null)
public static function _connect ($host, $dbname, $user, $password, ?string $charset = 'utf8mb4', ?array $options = null)
{
$options = $options ?? [
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,