summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-03-29 14:15:41 +0100
committerAndrey Andreev <narf@bofh.bg>2013-03-29 14:15:41 +0100
commit3b0c08ac289cf14c86feadf1c836b8b87f61cdbf (patch)
tree8d697924db77d6ff660f9b80976c62f0d3a66369 /system/database/DB_driver.php
parent5269c1cf2d5ae749309b06194f0a2a737a9ff114 (diff)
Fix #2353
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 04490c824..bbefbe566 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;
}