From 092b42b1192150288ab5f91a3cef24b1e145bd7c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jun 2012 23:17:59 +0300 Subject: Fix pdo_mysql db_connect() with empty char_set --- system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php index b545338e3..1898231f8 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php @@ -91,7 +91,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver { * * Reference: http://www.php.net/manual/en/ref.pdo-mysql.connection.php */ - if ( ! is_php('5.3.6')) + if ( ! is_php('5.3.6') && ! empty($this->char_set)) { $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES '.$this->char_set .(empty($this->db_collat) ? '' : " COLLATE '".$this->dbcollat."'"); -- cgit v1.2.3-24-g4f1b