summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-13 11:10:12 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-13 11:10:12 +0100
commit60138567c58dd924e2240973e34f0e3903a7ef2b (patch)
tree533c1dd40f69a534c0b03e8c327011427e458bd8 /system/database/DB_driver.php
parent7203d54604a372fd8dd0b30bd8d4cdbd0af738bc (diff)
parentdbf4a5ad7b279b2833484e30f1168032cea9b7d3 (diff)
Merge upstream branch
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 025441f90..bcff43392 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -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)."'";
}