summaryrefslogtreecommitdiffstats
path: root/system/database/DB_query_builder.php
diff options
context:
space:
mode:
authorYahya Erturan <root@yahyaerturan.com>2015-04-06 11:12:53 +0200
committerYahya Erturan <root@yahyaerturan.com>2015-04-06 11:12:53 +0200
commit8f793674fec90d0e3306dce59945fbd6da15936a (patch)
treed74d660534b72ddc0b6cda9147cecfb64a225346 /system/database/DB_query_builder.php
parentbd438890ccde1cfe3cb902e52ea7b2eee7a99f3f (diff)
#3727 Lowercase $side variable for $this->db->like() in Query Builder
$this->db->like('name',$value,'AFTER') returns LIKE '%$value%'. Safer to lowercase in case of UPPERCASE habits.
Diffstat (limited to 'system/database/DB_query_builder.php')
-rw-r--r--system/database/DB_query_builder.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index e5ffef2bb..a77ed57d0 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -925,6 +925,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
? $this->_group_get_type('') : $this->_group_get_type($type);
$v = $this->escape_like_str($v);
+
+ // lowercase $side for in case of UPPERCASE string
+ $side = strtolower($side);
if ($side === 'none')
{