diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-20 14:19:19 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-20 14:19:19 +0100 |
commit | de85d022e4704123028ad9b4a99407048c628d28 (patch) | |
tree | 02192d979c650b0407db23870f350b490167d659 /system/database/DB_driver.php | |
parent | a3b83d6562ca3f9ed0b429a2a6f3272b9f8bd72e (diff) | |
parent | 820999cb0d82c80d6dc5dde133568812c8113e29 (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 10 |
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)."'"; } |