summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-13 11:53:44 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-13 11:53:44 +0100
commit7c6813b423668472c401e2b9f7385800d9267d7c (patch)
tree8577760040339acc588edd41e8f4dab653385da7 /system/database/DB_driver.php
parentfb61aabd33607479bcfcaf7881bfd8fcf813d1a5 (diff)
parentd153002858256c6f206c8877f4952ed075902f9e (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 466b76b05..10bb35318 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);
@@ -668,7 +668,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)."'";
}