From d454f0e413ba6df6494b6c0da4d32fac8a17de1c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 10 Jun 2012 14:51:04 +0300 Subject: Add BETWEEN to _has_operator() --- system/database/DB_driver.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index d6f9f9c17..48f9fb5ac 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1062,7 +1062,7 @@ abstract class CI_DB_driver { */ protected function _has_operator($str) { - return (bool) preg_match('/(\s|<|>|!|=|IS NULL|IS NOT NULL)/i', trim($str)); + return (bool) preg_match('/(\s|<|>|!|=|IS NULL|IS NOT NULL|BETWEEN)/i', trim($str)); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b2f59e7e..027163db7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -246,6 +246,7 @@ Bug fixes for 3.0 - Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. - Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. - Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. +- Fixed a bug where _has_operator() didn't detect BETWEEN. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b