summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-25 22:17:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-25 22:17:59 +0200
commit092b42b1192150288ab5f91a3cef24b1e145bd7c (patch)
treed5e44c156417c3c09995913bfe8d99141c57640c /system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
parentbe76c87deef92d66a6de3dc977ee2317d0042032 (diff)
Fix pdo_mysql db_connect() with empty char_set
Diffstat (limited to 'system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php2
1 files changed, 1 insertions, 1 deletions
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."'");