From ec19332ba3791c933f2221d972ee073684b5ea3b Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 7 Oct 2011 09:53:35 -0400 Subject: Added check for quote mark --- system/database/drivers/pdo/pdo_driver.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'system/database/drivers') 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) { -- cgit v1.2.3-24-g4f1b