diff options
author | Andrey Andreev <narf@devilix.net> | 2014-12-02 00:11:54 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-12-02 00:11:54 +0100 |
commit | 5078eb5062457c1eef2fab0c58fa27f249616b78 (patch) | |
tree | e1d656838738b1ea0c7249aca3933546f5271a21 /system/database/DB_query_builder.php | |
parent | ab9217e316a79bc8fab2840c8f5bd2b9bc7a4dc0 (diff) |
Regressions ... #3380 #3194 ab9217e316a79bc8fab2840c8f5bd2b9bc7a4dc0
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r-- | system/database/DB_query_builder.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 621480635..1c0aed693 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -672,7 +672,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // value appears not to have been set, assign the test to IS NULL $k .= ' IS NULL'; } - elseif (preg_match('/\s*(!?=|<>)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) + elseif (preg_match('/\s*(!?=|<>|IS(?:\s+NOT)?)\s*$/i', $k, $match, PREG_OFFSET_CAPTURE)) { $k = substr($k, 0, $match[0][1]).($match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL'); } @@ -2319,7 +2319,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // Split multiple conditions $conditions = preg_split( - '/(?!<[\'"].*)(\s*AND\s+|\s*OR\s+)(?!.*[\'"])/i', + '/(\s*AND\s+|\s*OR\s+)/i', $this->{$qb_key}[$i]['condition'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY |