Fix pdo_mysql db_connect() with empty char_set
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index b545338..1898231 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 @@
*
* 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."'");