summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index a04a65eeb..bcff43392 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -165,7 +165,7 @@ class CI_DB_driver {
}
// Now we set the character set and that's all
- return $this->db_set_charset($this->char_set, $this->dbcollat);
+ return $this->db_set_charset($this->char_set);
}
// --------------------------------------------------------------------
@@ -177,9 +177,9 @@ class CI_DB_driver {
* @param string
* @return bool
*/
- public function db_set_charset($charset, $collation = '')
+ public function db_set_charset($charset)
{
- if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset, $collation))
+ if (method_exists($this, '_db_set_charset') && ! $this->_db_set_charset($charset))
{
log_message('error', 'Unable to set database connection charset: '.$charset);
@@ -670,7 +670,7 @@ class CI_DB_driver {
*/
public function escape($str)
{
- if (is_string($str))
+ if (is_string($str) OR method_exists($str, '__toString'))
{
$str = "'".$this->escape_str($str)."'";
}