summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_query_builder.php2
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 7490639dd..b99d4c607 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -343,7 +343,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$this->_track_aliases($table);
// Strip apart the condition and protect the identifiers
- if (preg_match('/([\[\w\.]+)([\W\s]+)(.+)/', $cond, $match))
+ if (preg_match('/([\[\w\.-]+)([\W\s]+)(.+)/', $cond, $match))
{
$cond = $this->protect_identifiers($match[1]).$match[2].$this->protect_identifiers($match[3]);
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 03b541e3d..5627f0221 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -248,6 +248,7 @@ Bug fixes for 3.0
- 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.
+- Fixed a bug where :doc:`Query Builder <database/query_builder>`'s join failed with identifiers containing dashes.
Version 2.1.1
=============