summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authortianhe1986 <w1s2j3229@163.com>2016-10-28 12:48:35 +0200
committertianhe1986 <w1s2j3229@163.com>2016-10-28 12:48:35 +0200
commiteef5951ae313c2c4080e94b8c1aa743a6d6c93b7 (patch)
tree19484398cbe53e8b06e90829c696b0daa00e638a /system
parentc274a8fc7f8f0a012e8c535eab976af01d6e106b (diff)
Match single quote in is_write_type().
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
Diffstat (limited to 'system')
-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 465d8db7b..a9a3f29e5 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -982,7 +982,7 @@ abstract class CI_DB_driver {
*/
public function is_write_type($sql)
{
- return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql);
+ return (bool) preg_match('/^\s*["\']?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|REINDEX)\s/i', $sql);
}
// --------------------------------------------------------------------