summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorRoger Herbert <rogerlherbert@gmail.com>2012-03-14 09:37:06 +0100
committerRoger Herbert <rogerlherbert@gmail.com>2012-03-14 09:37:06 +0100
commita5c8a6d0fb7802aaf284b7b3ef77966f43baae56 (patch)
tree12163c9d08070e73b025dd0a6fc602bccc606e90 /system/database/DB_driver.php
parentb81f909f8aaa3bedc3820c0d4c9056b57113b46e (diff)
parentce707b4cafd64b95031690cf927584b1d60c7ad7 (diff)
timespan() helper change
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)."'";
}