summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authortianhe1986 <w1s2j3229@163.com>2016-10-28 12:43:30 +0200
committertianhe1986 <w1s2j3229@163.com>2016-10-28 12:43:30 +0200
commitc274a8fc7f8f0a012e8c535eab976af01d6e106b (patch)
tree5ab7e2a0207d90e8060917f228b0d61152a60fe8 /system/database/DB_driver.php
parent015c9a03447a7367ab1e5a2357ad7aac2b2e581f (diff)
Match both single and double quote in compile_binds().
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
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 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],