summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2011-10-07 15:53:35 +0200
committerTimothy Warren <tim@timshomepage.net>2011-10-07 15:53:35 +0200
commitec19332ba3791c933f2221d972ee073684b5ea3b (patch)
tree4a2f62e41e2af95a7c77b1a0b632314352cebc85 /system/database/drivers
parent3351275b1c80c9d4ec2e6fa551c3cee3a0e47b27 (diff)
Added check for quote mark
Diffstat (limited to 'system/database/drivers')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 1a84404bb..24c658a35 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -313,8 +313,11 @@ class CI_DB_pdo_driver extends CI_DB {
$str = $this->conn_id->quote($str);
//If there are duplicated quotes, trim them away
- $str = substr($str, 1, -1);
-
+ if(strpos($str, "'") === 0)
+ {
+ $str = substr($str, 1, -1);
+ }
+
// escape LIKE condition wildcards
if ($like === TRUE)
{