summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-08-20 12:23:21 +0200
committerAndrey Andreev <narf@devilix.net>2015-08-20 12:23:21 +0200
commitbe178a79382cae5079622396f8f9679a15e0f58b (patch)
treee993447affb9f36d037c275919e7c88dc70d2494
parenteb492589cb6ba0faaadadebe2a5cd333de80b6c4 (diff)
Fix #4065
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 34d3a5979..9c4d7e007 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1760,7 +1760,7 @@ abstract class CI_DB_driver {
}
// Convert tabs or multiple spaces into single spaces
- $item = preg_replace('/\s+/', ' ', $item);
+ $item = preg_replace('/\s+/', ' ', trim($item));
// If the item has an alias declaration we remove it and set it aside.
// Note: strripos() is used in order to support spaces in table names
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index a0a54c34b..b355d8d9e 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -19,6 +19,7 @@ Bug fixes for 3.0.2
- Fixed a bug (#4052) - :doc:`Routing <general/routing>` with anonymous functions didn't work for routes that don't use regular expressions.
- Fixed a bug (#4056) - :doc:`Input Library <libraries/input>` method ``get_request_header()`` could not return a value unless ``request_headers()`` was called beforehand.
- Fixed a bug where the :doc:`Database Class <database/index>` entered an endless loop if it fails to connect with the 'sqlsrv' driver.
+- Fixed a bug (#4065) - :doc:`Database <database/index>` method ``protect_identifiers()`` treats a traling space as an alias separator if the input doesn't contain ' AS '.
Version 3.0.1
=============