summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-01 18:24:38 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-01 18:24:38 +0100
commite3a68042c086acfc98ae273adbd8527af0c6ab8b (patch)
tree8fac11c939596396b9b3fb4aae83e8cf58e147dd /system/database/DB_driver.php
parentea3eec9f670ea861a65a3e251d8c518ff47e2506 (diff)
parent8e22cfdc2fe626bed2a3e570bc71f25d61d6546c (diff)
Merge pull request #1083 from narfbg/develop-db-set-charset
Fixed a db_set_charset() bug
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 8ab5415ea..5f435e363 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -185,20 +185,19 @@ class CI_DB_driver {
/**
* Set client character set
*
- * @access public
* @param string
* @param string
- * @return resource
+ * @return bool
*/
- function db_set_charset($charset, $collation)
+ public function db_set_charset($charset, $collation = '')
{
- if ( ! $this->_db_set_charset($this->char_set, $this->dbcollat))
+ if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset, $collation))
{
- log_message('error', 'Unable to set database connection charset: '.$this->char_set);
+ log_message('error', 'Unable to set database connection charset: '.$charset);
if ($this->db_debug)
{
- $this->display_error('db_unable_to_set_charset', $this->char_set);
+ $this->display_error('db_unable_to_set_charset', $charset);
}
return FALSE;