diff options
author | Andrey Andreev <narf@devilix.net> | 2016-10-31 12:09:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 12:09:33 +0100 |
commit | 84f5366a8d76fe935a57cb9dbf61c970d98a0a27 (patch) | |
tree | 7fc0874aead53588d5b452b058a2c94edee785c1 /system/database/DB_driver.php | |
parent | 72969fd0bce07663d9a54ada2d0950f248e6a542 (diff) | |
parent | 17e662951c25ae2c83328508e90b9a0b99d49603 (diff) |
Merge pull request #4893 from tianhe1986/develop_fix_dbdriver_quote
Fix compile_binds: do not use back references inside a character class.
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 064d4070e..c142a1354 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("/(['\"])[^\\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], |