From 59d1ffd927ef3b63dbadf42e1caf14957201fd2d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 29 Jun 2015 11:26:01 +0300 Subject: Fix #3932 --- system/database/DB_query_builder.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 8251f4558..d89c7ba8c 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -2326,7 +2326,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 diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 339d5076f..073f687e9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -44,6 +44,7 @@ Bug fixes for 3.0.1 - Fixed a bug (#3904) - :doc:`Form Validation Library ` ignored "named" callback rules when the field is empty and there's no 'required' rule. - Fixed a bug (#3922) - :doc:`Email ` and :doc:`XML-RPC ` libraries could enter an infinite loop due to `PHP bug #39598 `_. - Fixed a bug (#3913) - :doc:`Cache Library ` didn't work with the direct ``$this->cache->$driver_name->method()`` syntax with Redis and Memcache(d). +- Fixed a bug (#3932) - :doc:`Query Builder ` didn't properly compile WHERE and HAVING conditions for field names that end with "and", "or". Version 3.0.0 -- cgit v1.2.3-24-g4f1b