summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-10-31 08:35:29 +0100
committerGitHub <noreply@github.com>2016-10-31 08:35:29 +0100
commit72969fd0bce07663d9a54ada2d0950f248e6a542 (patch)
tree0fe9cd80cc8a1cefa7b4d8cc38ec89b22f177b3a /system/database/DB_driver.php
parent67b40a561111a5a65faa245cd4c575e8d945cfb8 (diff)
parente791c2dd5112594d423342ceb29d6586acdffba3 (diff)
Merge pull request #4886 from tianhe1986/develop_dbdriver_quote
Detect double-quoted strings in DB::compile_binds()
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 6f39cc963..064d4070e 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],