diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-20 14:33:37 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-20 14:33:37 +0100 |
commit | 838ab99854bc3eb2b9495ce5db92cd6611ef813e (patch) | |
tree | eec6eb0bebe3102512df2f532ae90d8d533ecb69 /system/database/DB_driver.php | |
parent | 65b568fcd444fbeaf6fa9130289c254e34e5bbbd (diff) | |
parent | 820999cb0d82c80d6dc5dde133568812c8113e29 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-db-driver
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 7fc569e9a..162d3bbb2 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 * @@ -169,7 +169,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); } // -------------------------------------------------------------------- @@ -181,9 +181,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); @@ -661,7 +661,7 @@ class CI_DB_driver { */ public function escape($str) { - if (is_string($str)) + if (is_string($str) OR method_exists($str, '__toString')) { return "'".$this->escape_str($str)."'"; } @@ -1327,4 +1327,4 @@ class CI_DB_driver { } /* End of file DB_driver.php */ -/* Location: ./system/database/DB_driver.php */
\ No newline at end of file +/* Location: ./system/database/DB_driver.php */ |