summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-04-13 12:08:52 +0200
committerAndrey Andreev <narf@devilix.net>2018-04-13 12:08:52 +0200
commit68b0e088a25dee720642f42d76ea395c209be855 (patch)
tree099711e4084204e3113991dcacabd0c8b11c8606
parent11c25e1dc3995ab7707f9435315c12c31ad6cf3e (diff)
Fix #5448
-rw-r--r--system/database/DB_query_builder.php2
-rw-r--r--user_guide_src/source/changelog.rst5
2 files changed, 6 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 8f477e3a1..8bc6328b4 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -987,7 +987,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$v .= sprintf($this->_like_escape_str, $this->_like_escape_chr);
}
- $qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE", 'value' => $v, 'escape' => $escape);
+ $qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE {$v}", 'value' => NULL, 'escape' => $escape);
$this->qb_where[] = $qb_where;
if ($this->qb_caching === TRUE)
{
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index d0989da48..7f2a8355f 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -8,6 +8,11 @@ Version 3.1.9
Release Date: Not Released
+Bug fixes for 3.1.9
+-------------------
+
+- Fixed a regression (#5448) - :doc:`Query Builder <database/query_builder>` methods ``like()``, ``or_like()`` (and siblings) didn't apply *dbprefix* or identifier escaping.
+
Version 3.1.8
=============