diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-13 09:39:33 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-13 09:39:33 +0100 |
commit | b0818b87ed0f6dda65399e6d97f28329fb72b1dc (patch) | |
tree | a96962212cb012be32ab09545dcd5c4dbdac05e2 /system/database | |
parent | 6b535f51fcb94e0a645fda0d0356f4748076877e (diff) | |
parent | 7c4870c3741e165bc7bc06624c816e66db474ee2 (diff) |
Merge pull request #1177 from Eclarian/feature/db_toString_support
Adding Support to Properly Escape Objects that have __toString() magic method
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_driver.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 12cd3917c..bcff43392 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -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)."'"; } |