summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/database/drivers/odbc/odbc_driver.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 43e8eeac6..465d8db7b 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -938,7 +938,7 @@ abstract class CI_DB_driver {
$ml = strlen($this->bind_marker);
// Make sure not to replace a chunk inside a string that happens to match the bind marker
- if ($c = preg_match_all("/'[^']*'/i", $sql, $matches))
+ if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches))
{
$c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i',
str_replace($matches[0],
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 63df2963d..3a893ace4 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -172,7 +172,7 @@ class CI_DB_odbc_driver extends CI_DB_driver {
$ml = strlen($this->bind_marker);
// Make sure not to replace a chunk inside a string that happens to match the bind marker
- if ($c = preg_match_all("/'[^']*'/i", $sql, $matches))
+ if ($c = preg_match_all("/(['\"])[^\\1]*\\1/i", $sql, $matches))
{
$c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i',
str_replace($matches[0],