summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-02-27 11:20:52 +0100
committerAndrey Andreev <narf@bofh.bg>2012-02-27 11:20:52 +0100
commit063f5963b01f9c19a2ed070d9e3aa077a2515c21 (patch)
tree435e52e36a638740560816d7e4fa4b0c490f9d47 /system/database/DB_driver.php
parent5148029aaf204fb3e7e4f24a794bee781d0c218b (diff)
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 271a70ec4..f1e9e7239 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;