From e8bddd51cdf69def8f971c30f70f5504db9c109c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 16 Jul 2021 08:05:45 +0200 Subject: [PATCH] Connection: Don't accept the empty string as charset --- src/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connection.php b/src/Connection.php index d733166..ef77ac1 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -160,7 +160,7 @@ public function connect() $this->pdo = $this->createPdoAdapter(); - if ($this->config->charset !== null) { + if (! empty($this->config->charset)) { $this->exec(sprintf('SET NAMES %s', $this->pdo->quote($this->config->charset))); }