Merge pull request #4893 from tianhe1986/develop_fix_dbdriver_quote
Fix compile_binds: do not use back references inside a character class.
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index b5512fd..82efa49 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -172,7 +172,7 @@
$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("/(['\"])[^\\1]*\\1/i", $sql, $matches))
+ if ($c = preg_match_all("/'[^']*'|\"[^\"]*\"/i", $sql, $matches))
{
$c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i',
str_replace($matches[0],