summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-20 20:18:08 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-20 20:18:08 +0100
commit3a5efc291ac17a8a9886be25f6b430796969d154 (patch)
treefd1489bf5117bf2d8b08c0f6ee2282e9ad869e9d /system/database/DB_driver.php
parentd337a2621d36aebd0747b4e10a61b98bb13a2793 (diff)
Fix issue #2015
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 65ff792dc..9fcea39b6 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -985,7 +985,7 @@ abstract class CI_DB_driver {
*/
public function escape($str)
{
- if (is_string($str) OR method_exists($str, '__toString'))
+ if (is_string($str) OR (is_object($str) && method_exists($str, '__toString')))
{
return "'".$this->escape_str($str)."'";
}