summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-09-17 10:13:46 +0200
committerAndrey Andreev <narf@devilix.net>2014-09-17 10:13:46 +0200
commit2c6cdd7d3ac4c929bf6fa172b6ba48c282e3a831 (patch)
tree04a3b51697fbb344e306af60cceeddb978e784ed /system/database/DB_driver.php
parentdc0ad20329ed3c3f800f3fe0b68f73cff970cdb2 (diff)
Fix #3238
Close #3239
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 12ab5bb2a..62cea758e 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1440,7 +1440,7 @@ abstract class CI_DB_driver {
*/
protected function _has_operator($str)
{
- return (bool) preg_match('/(<|>|!|=|\sIS NULL|\sIS NOT NULL|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str));
+ return (bool) preg_match('/(<|>|!|=|\sIS\s|\sEXISTS|\sBETWEEN|\sLIKE|\sIN\s*\(|\s)/i', trim($str));
}
// --------------------------------------------------------------------
@@ -1464,8 +1464,7 @@ abstract class CI_DB_driver {
'\s*(?:<|>|!)?=\s*', // =, <=, >=, !=
'\s*<>?\s*', // <, <>
'\s*>\s*', // >
- '\s+IS NULL', // IS NULL
- '\s+IS NOT NULL', // IS NOT NULL
+ '\s+IS(?:\sNOT)?(?:\sNULL)?', // IS[ NOT] NULL
'\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql)
'\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql)
'\s+BETWEEN\s+\S+\s+AND\s+\S+', // BETWEEN value AND value