summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 6833172f6..97021f125 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1706,7 +1706,10 @@ abstract class CI_DB_driver {
// If a parenthesis is found we know that we do not need to
// escape the data or add a prefix. There's probably a more graceful
// way to deal with this, but I'm not thinking of it -- Rick
- if (strpos($item, '(') !== FALSE)
+ //
+ // Added exception for single quotes as well, we don't want to alter
+ // literal strings. -- Narf
+ if (strpos($item, '(') !== FALSE OR strpos($item, "'") !== FALSE)
{
return $item;
}