From 3b0c08ac289cf14c86feadf1c836b8b87f61cdbf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Mar 2013 15:15:41 +0200 Subject: Fix #2353 --- system/database/DB_driver.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'system/database/DB_driver.php') 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; } -- cgit v1.2.3-24-g4f1b