From 4430d95d4089991d3664a11a941691ae53f9802f Mon Sep 17 00:00:00 2001 From: osaajani <> Date: Mon, 26 Apr 2021 02:41:41 +0200 Subject: [PATCH] Fix charset of mysql queries to use proper utf8mb4 instead of the bad utf8 from mysql, this should allow unicode smiley in messages. --- VERSION | 2 +- descartes/Model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 6c8dc7e..903cd9f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.1.0 +v3.1.1 diff --git a/descartes/Model.php b/descartes/Model.php index 207e680..ad14075 100644 --- a/descartes/Model.php +++ b/descartes/Model.php @@ -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,