diff options
Diffstat (limited to 'system/database/DB_driver.php')
-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 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)."'"; } |